platform/x86: intel-hid: do not set parents of input devices explicitly
authorMichał Kępień <kernel@kempniu.pl>
Thu, 9 Mar 2017 09:36:51 +0000 (10:36 +0100)
committerDarren Hart <dvhart@infradead.org>
Wed, 15 Mar 2017 05:58:12 +0000 (22:58 -0700)
devm_input_allocate_device() already causes the supplied struct device
to be set as the parent of the input device, so doing it again is
redundant.

Signed-off-by: Michał Kępień <kernel@kempniu.pl>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-and-tested-by: Alex Hung <alex.hung@canonical.com>
drivers/platform/x86/intel-hid.c

index 5eab31659cbaeebbfdc84eecdf429c162c78f36a..b40059aba85656dafa65d2a7bdb0f0589a7b5c8b 100644 (file)
@@ -152,7 +152,6 @@ static int intel_hid_input_setup(struct platform_device *device)
        if (ret)
                return ret;
 
-       priv->input_dev->dev.parent = &device->dev;
        priv->input_dev->name = "Intel HID events";
        priv->input_dev->id.bustype = BUS_HOST;
 
@@ -173,7 +172,6 @@ static int intel_button_array_input_setup(struct platform_device *device)
        if (ret)
                return ret;
 
-       priv->array->dev.parent = &device->dev;
        priv->array->name = "Intel HID 5 button array";
        priv->array->id.bustype = BUS_HOST;