From: Jean Delvare Date: Sat, 28 Jan 2012 10:10:38 +0000 (+0100) Subject: drm/radeon/kms: Fix device tree linkage of i2c buses X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1ffd57c1da2a73b0a0e5cd7a6dd52cc49e36bef9;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git drm/radeon/kms: Fix device tree linkage of i2c buses 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 Cc: Dave Airlie Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c index 7bb1b079f48..e2a393ff0c4 100644 --- a/drivers/gpu/drm/radeon/radeon_i2c.c +++ b/drivers/gpu/drm/radeon/radeon_i2c.c @@ -897,6 +897,7 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev, 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 ||