RE: [PATCH v5] iio: adc: add new lp8788 adc driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> Couple of nitpicks in line to add to Lars-Peter's ones.

I really appreciate it.

> > +#define LP8788_CHAN(_id, _type) {				\
> > +		.type = _type,					\
> > +		.indexed = 1,					\
> > +		.channel = LPADC_##_id,				\
> > +		.info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT |	\
> > +			IIO_CHAN_INFO_SCALE_SEPARATE_BIT,	\
> > +		.address = LP8788_ADC_RAW,			\
> > +		.scan_type = IIO_ST('u', 12, 16, 0),		\
> > +		.scan_index = 1,				\
> scan_type and scan_index should only be relevant if you are doing
> buffered capture (unless I'm missing another use of them in here
> somewhere...)  Hence drop them for now...

Thanks for clarifying this.

> > +static void lp8788_iio_map_unregister(struct iio_dev *indio_dev,
> > +				struct lp8788_adc *adc)
> > +{
> Can't immediately see how this runs without adc->map set. If it
> doesn't drop the check.
> > +	if (adc->map)
> > +		iio_map_array_unregister(indio_dev, adc->map);
> > +}

You're right. No need to check whether iio_map is valid or not.
That is already implemented in the iio_map_array_unregister().
It will be removed in the next patch.

Thank you.

Best Regards,
Milo
--
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


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux