drm/radeon/kms: Fix device tree linkage of i2c buses
authorJean Delvare <jdelvare@suse.de>
Sat, 28 Jan 2012 10:10:38 +0000 (11:10 +0100)
committerDave Airlie <airlied@redhat.com>
Mon, 30 Jan 2012 09:32:11 +0000 (09:32 +0000)
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@suse.de>
Cc: Dave Airlie <airlied@gmail.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_i2c.c

index 7bb1b079f4806f6d70414809e43e060c1bd1cec2..e2a393ff0c44b6ecea60d479399dad10f2c6490a 100644 (file)
@@ -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 ||