platform/x86: intel-hid: do not set parents of input devices explicitly
PATCH 1/1 platform/x86: intel-hid: do not set parents of input devices explicitly
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.
---
This patch needs my recent intel-hid cleanup series to apply cleanly. In other words, it should apply on top of testing, but not for-next.
drivers/platform/x86/intel-hid.c | 2 -- 1 file changed, 2 deletions(-)
drivers/platform/x86/intel-hid.c +0 -2
@@ -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 ;
Signature · 1 line
2.12.0
Quoted 26 lines · Michał Kępień
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ń <[email protected]>---
This patch needs my recent intel-hid cleanup series to apply cleanly. In other words, it should apply on top of testing, but not for-next.drivers/platform/x86/intel-hid.c | 2 -- 1 file changed, 2 deletions(-)drivers/platform/x86/intel-hid.c +0
-1@@ -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 ;
drivers/platform/x86/intel-hid.c static int intel_button_array_input_setup(struct platform_device *device) · line 177
Quoted 7 lines
drivers/platform/x86/intel-hid.c +0
-1@@ -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 ;
The patch, on top of previous patches, is tested on Latitude 7480
Quoted 7 lines · Alex Hung
Quoted 6 lines · Michał Kępień
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ń <[email protected]>
Pushed to testing, thanks.
Quoted 4 lines
The patch, on top of previous patches, is tested on Latitude 7480
Reviewed-and-tested-by Alex Hung <[email protected]>
Alex, this tag is not recognized by patchwork :-(, It would be nice to use separate tags.
I would join them if needed (usually when they sent against cover letter).
Signature · 2 lines
With Best Regards, Andy Shevchenko