[PATCH] drm/radeon/kms: Fix device tree linkage of i2c buses

Jean Delvare jdelvare at suse.de
Sat Jan 28 02:10:38 PST 2012


Properly set the parent device of i2c buses before registering them so
that they will show at the right place in the device tree (rather than
in /sys/devices directly.)

Signed-off-by: Jean Delvare <jdelvare at suse.de>
Cc: Dave Airlie <airlied at gmail.com>
Cc: Alex Deucher <alexdeucher at gmail.com>
---
 drivers/gpu/drm/radeon/radeon_i2c.c |    1 +
 1 file changed, 1 insertion(+)

--- linux-3.3-rc1.orig/drivers/gpu/drm/radeon/radeon_i2c.c	2012-01-26 09:12:40.000000000 +0100
+++ linux-3.3-rc1/drivers/gpu/drm/radeon/radeon_i2c.c	2012-01-27 22:58:58.235346502 +0100
@@ -897,6 +897,7 @@ struct radeon_i2c_chan *radeon_i2c_creat
 	i2c->rec = *rec;
 	i2c->adapter.owner = THIS_MODULE;
 	i2c->adapter.class = I2C_CLASS_DDC;
+	i2c->adapter.dev.parent = &dev->pdev->dev;
 	i2c->dev = dev;
 	i2c_set_adapdata(&i2c->adapter, i2c);
 	if (rec->mm_i2c ||

-- 
Jean Delvare
Suse L3


More information about the dri-devel mailing list