Skip to contentSkip to conversation

iio: light apds9960: Add the missing dev.parent

PATCH In review Yong Li 3 participants 3 messages May 5, 2016 – May 14, 2016 IIO

lore
Share & tools
lore

Yong Li

author
#0 lore raw

PATCH 1/1 iio: light apds9960: Add the missing dev.parent

Without this, the iio:deviceX is missing in the /sys/bus/i2c/devices/0-0039

---
 drivers/iio/light/apds9960.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/light/apds9960.c +1 -0
index 35928fb..f47cc0a 100644
@@ -1010,6 +1010,7 @@ static int apds9960_probe(struct i2c_client *client,
 
 	iio_device_attach_buffer(indio_dev, buffer);
 
+	indio_dev->dev.parent = &client->dev;
 	indio_dev->info = &apds9960_info;
 	indio_dev->name = APDS9960_DRV_NAME;
 	indio_dev->channels = apds9960_channels;
Signature · 1 line
2.5.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 22 lines · Yong Li

Without this, the iio:deviceX is missing in the /sys/bus/i2c/devices/0-0039

---
 drivers/iio/light/apds9960.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/light/apds9960.c +1 -1
index 35928fb..f47cc0a 100644
@@ -1010,6 +1010,7 @@ static int apds9960_probe(struct i2c_client *client,
 
        iio_device_attach_buffer(indio_dev, buffer);
 
+       indio_dev->dev.parent = &client->dev;
        indio_dev->info = &apds9960_info;
        indio_dev->name = APDS9960_DRV_NAME;
        indio_dev->channels = apds9960_channels;
--

2.5.0

maintainer
#2 lore raw
Quoted 6 lines · Matt Ranostay
Quoted 3 lines · Yong Li

Without this, the iio:deviceX is missing in the /sys/bus/i2c/devices/0-0039

Applied and marked for stable.
I'd added a brief note that some userspace code may expect this path to work to justify the stable tag.

Thanks,

Jonathan

Quoted 24 lines
Quoted 17 lines
---
 drivers/iio/light/apds9960.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/light/apds9960.c +1 -1
index 35928fb..f47cc0a 100644
@@ -1010,6 +1010,7 @@ static int apds9960_probe(struct i2c_client *client,
 
        iio_device_attach_buffer(indio_dev, buffer);
 
+       indio_dev->dev.parent = &client->dev;
        indio_dev->info = &apds9960_info;
        indio_dev->name = APDS9960_DRV_NAME;
        indio_dev->channels = apds9960_channels;
--
Quoted 2 lines

2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html