lkml.org 
[lkml]   [2012]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v5] iio: adc: add new lp8788 adc driver
Date
> 
> 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


\
 
 \ /
  Last update: 2012-09-14 03:01    [W:0.060 / U:38.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site