linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kim, Milo" <Milo.Kim@ti.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Jonathan Cameron <jic23@cam.ac.uk>,
	Lars-Peter Clausen <lars@metafoo.de>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v5] iio: adc: add new lp8788 adc driver
Date: Fri, 14 Sep 2012 00:33:36 +0000	[thread overview]
Message-ID: <A874F61F95741C4A9BA573A70FE3998F41EF4C03@DQHE02.ent.ti.com> (raw)
In-Reply-To: <5051D05C.4050802@kernel.org>

> 
> 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

      reply	other threads:[~2012-09-14  0:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-10  8:02 [PATCH v5] iio: adc: add new lp8788 adc driver Kim, Milo
2012-09-10  9:07 ` Lars-Peter Clausen
2012-09-14  0:33   ` Kim, Milo
2012-09-14  8:35     ` Lars-Peter Clausen
2012-09-15  0:15       ` Kim, Milo
2012-09-15  9:05         ` Jonathan Cameron
2012-09-13 12:23 ` Jonathan Cameron
2012-09-14  0:33   ` Kim, Milo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A874F61F95741C4A9BA573A70FE3998F41EF4C03@DQHE02.ent.ti.com \
    --to=milo.kim@ti.com \
    --cc=jic23@cam.ac.uk \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).