On Wed, 2015-01-28 at 18:46 +0000, Jonathan Cameron wrote: > On 20/01/15 10:15, Ivan T. Ivanov wrote: > > From: Stanimir Varbanov <svarbanov@xxxxxxxxxx> > > > > The voltage ADC is peripheral of Qualcomm SPMI PMIC chips. It has > > 15bits resolution and register space inside PMIC accessible across > > SPMI bus. > > > > The vadc driver registers itself through IIO interface. > > > > Signed-off-by: Stanimir Varbanov <svarbanov@xxxxxxxxxx> > > Signed-off-by: Ivan T. Ivanov <iivanov@xxxxxxxxxx> > One minor comment inline. Looks good to me. > Applied to the togreg branch of iio.git - initially pushed out as testing. > > Glad to have this one out of the pending list ;) Thank you. > > > + > > + irq_eoc = platform_get_irq(pdev, 0); > > + if (irq_eoc < 0) { > > + if (irq_eoc == -EPROBE_DEFER || irq_eoc == -EINVAL) > > + return irq_eoc; > This does feel a little backwards. I'd normally expect to see those > errors that indicate one is not specified tested against, rather than > trying to guess all the reasons it might fail otherwise.... > > This way round strikes me as probably more fragile as additional errors > may turn up in that function over time.. > Agree, would it be better if driver just check for EPROBE_DEFER and treat all other error codes as "no interrupt defined"? I could send followup patch if you like. Regards, Ivan -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html