Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1394931

[PATCH] iio: light apds9960: Add the missing dev.parent

From Yong Li <sdliyong@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] iio: light apds9960: Add the missing dev.parent
Date 2016-05-05 10:20 +0200
Message-ID <rvmFQ-4se-13@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

Signed-off-by: Yong Li <sdliyong@gmail.com>
---
 drivers/iio/light/apds9960.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c
index 35928fb..f47cc0a 100644
--- a/drivers/iio/light/apds9960.c
+++ b/drivers/iio/light/apds9960.c
@@ -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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] iio: light apds9960: Add the missing dev.parent Yong Li <sdliyong@gmail.com> - 2016-05-05 10:20 +0200
  Re: [PATCH] iio: light apds9960: Add the missing dev.parent Matt Ranostay <mranostay@gmail.com> - 2016-05-05 10:20 +0200

csiph-web