From: Jonathan Cameron <jic23@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>, linux-iio@vger.kernel.org
Subject: Re: [PATCH 2/2] iio: light: bh1780: assign a static name
Date: Sun, 29 May 2016 19:53:10 +0100 [thread overview]
Message-ID: <3c1a7937-3c90-9f26-c9fe-e2ffad140e06@kernel.org> (raw)
In-Reply-To: <1464162027-24612-2-git-send-email-linus.walleij@linaro.org>
On 25/05/16 08:40, Linus Walleij wrote:
> Using the struct i2c_device->id field for naming the light sensor
> is a bad idea: when booting from the pure device tree this is NULL
> and that causes the device not to have the "name" property in
> sysfs and that in turn confuses the "lsiio" command to stop listing
> devices.
>
> So instead of using the device .id, use the hard string "bh1780",
> which works just fine.
>
> Fixes: 1f0477f18306 ("iio: light: new driver for the ROHM BH1780")
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Applied to the fixes-togreg-post-rc1 and marked for stable.
Thanks,
Jonathan
> ---
> drivers/iio/light/bh1780.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/light/bh1780.c b/drivers/iio/light/bh1780.c
> index 5fd432df2c8f..b54dcba05a82 100644
> --- a/drivers/iio/light/bh1780.c
> +++ b/drivers/iio/light/bh1780.c
> @@ -187,7 +187,7 @@ static int bh1780_probe(struct i2c_client *client,
>
> indio_dev->dev.parent = &client->dev;
> indio_dev->info = &bh1780_info;
> - indio_dev->name = id->name;
> + indio_dev->name = "bh1780";
> indio_dev->channels = bh1780_channels;
> indio_dev->num_channels = ARRAY_SIZE(bh1780_channels);
> indio_dev->modes = INDIO_DIRECT_MODE;
>
next prev parent reply other threads:[~2016-05-29 18:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-25 7:40 [PATCH 1/2] iio: bh1780: dereference the client properly Linus Walleij
2016-05-25 7:40 ` [PATCH 2/2] iio: light: bh1780: assign a static name Linus Walleij
2016-05-29 18:53 ` Jonathan Cameron [this message]
2016-06-19 11:25 ` Jonathan Cameron
2016-06-19 18:04 ` Linus Walleij
2016-06-19 19:38 ` Jonathan Cameron
2016-05-29 18:52 ` [PATCH 1/2] iio: bh1780: dereference the client properly Jonathan Cameron
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=3c1a7937-3c90-9f26-c9fe-e2ffad140e06@kernel.org \
--to=jic23@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@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).