]> git.baikalelectronics.ru Git - kernel.git/commitdiff
platform/x86: intel_cht_int33fe: Convert to use set_secondary_fwnode()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 8 Apr 2020 16:09:04 +0000 (19:09 +0300)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 20 Apr 2020 11:47:45 +0000 (14:47 +0300)
In one place we open coded set_secondary_fwnode().
Let's replace it with a helper.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
drivers/platform/x86/intel_cht_int33fe_typec.c

index 0f547d35c90d23a78a961e59823f6e66a7b71839..904e75d399535d3ed2a4c1d51c2206b8caece0a7 100644 (file)
@@ -239,8 +239,7 @@ cht_int33fe_register_max17047(struct device *dev, struct cht_int33fe_data *data)
        i2c_for_each_dev(&max17047, cht_int33fe_check_for_max17047);
        if (max17047) {
                /* Pre-existing i2c-client for the max17047, add device-props */
-               fwnode->secondary = ERR_PTR(-ENODEV);
-               max17047->dev.fwnode->secondary = fwnode;
+               set_secondary_fwnode(&max17047->dev, fwnode);
                /* And re-probe to get the new device-props applied. */
                ret = device_reprobe(&max17047->dev);
                if (ret)