Skip to contentSkip to conversation

patch "iio: light: bh1780: assign a static name" added to staging-linus

PATCH [email protected] 1 participant 1 message Jun 8, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

iio: light: bh1780: assign a static name

to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

Quoted 1 line

From 0dd09ca419d712d315ffd864158f515e6c64261a Mon Sep 17 00:00:00 2001

From: Linus Walleij <[email protected]>
Date: Wed, 25 May 2016 09:40:27 +0200
Subject: iio: light: bh1780: assign a static name

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")
---
 drivers/iio/light/bh1780.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/light/bh1780.c +1 -1
index 5fd432df2c8f..b54dcba05a82 100644
@@ -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;
Signature · 1 line
2.8.3