i2c: dln2: set the device tree node of the adapter
authorOctavian Purdila <octavian.purdila@intel.com>
Fri, 27 Mar 2015 15:37:10 +0000 (17:37 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 27 Mar 2015 15:56:21 +0000 (16:56 +0100)
This patch makes sure the platform device tree node is inherited by
the adapter device. This allows the DLN2 bus to work with i2c devices
defined in the device tree.

Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-dln2.c

index b6f9ba7eb175641d12be32664c7172091c43ea6f..1600edd57ce9d7d9a78adaf5daaaad46a4469b2b 100644 (file)
@@ -210,6 +210,7 @@ static int dln2_i2c_probe(struct platform_device *pdev)
        dln2->adapter.algo = &dln2_i2c_usb_algorithm;
        dln2->adapter.quirks = &dln2_i2c_quirks;
        dln2->adapter.dev.parent = dev;
+       dln2->adapter.dev.of_node = dev->of_node;
        i2c_set_adapdata(&dln2->adapter, dln2);
        snprintf(dln2->adapter.name, sizeof(dln2->adapter.name), "%s-%s-%d",
                 "dln2-i2c", dev_name(pdev->dev.parent), dln2->port);