mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] platform/x86: intel-hid: do not set parents of input devices explicitly
@ 2017-03-09  9:36 Michał Kępień
  2017-03-13 10:37 ` Alex Hung
  0 siblings, 1 reply; 3+ messages in thread
From: Michał Kępień @ 2017-03-09  9:36 UTC (permalink / raw)
  To: Alex Hung, Darren Hart, Andy Shevchenko; +Cc: platform-driver-x86, linux-kernel

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>
---
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(-)

diff --git a/drivers/platform/x86/intel-hid.c b/drivers/platform/x86/intel-hid.c
index 5eab31659cba..b40059aba856 100644
--- a/drivers/platform/x86/intel-hid.c
+++ b/drivers/platform/x86/intel-hid.c
@@ -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;
 
-- 
2.12.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/x86: intel-hid: do not set parents of input devices explicitly
  2017-03-09  9:36 [PATCH] platform/x86: intel-hid: do not set parents of input devices explicitly Michał Kępień
@ 2017-03-13 10:37 ` Alex Hung
  2017-03-13 16:17   ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Hung @ 2017-03-13 10:37 UTC (permalink / raw)
  To: Michał Kępień, Darren Hart, Andy Shevchenko
  Cc: platform-driver-x86, linux-kernel

On 2017-03-09 05:36 PM, Michał Kępień wrote:
> 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>
> ---
> 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(-)
>
> diff --git a/drivers/platform/x86/intel-hid.c b/drivers/platform/x86/intel-hid.c
> index 5eab31659cba..b40059aba856 100644
> --- a/drivers/platform/x86/intel-hid.c
> +++ b/drivers/platform/x86/intel-hid.c
> @@ -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;
>
>


The patch, on top of previous patches, is tested on Latitude 7480

Reviewed-and-tested-by: Alex Hung <alex.hung@canonical.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/x86: intel-hid: do not set parents of input devices explicitly
  2017-03-13 10:37 ` Alex Hung
@ 2017-03-13 16:17   ` Andy Shevchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2017-03-13 16:17 UTC (permalink / raw)
  To: Alex Hung
  Cc: Michał Kępień,
	Darren Hart, Andy Shevchenko, Platform Driver, linux-kernel

On Mon, Mar 13, 2017 at 12:37 PM, Alex Hung <alex.hung@canonical.com> wrote:
> On 2017-03-09 05:36 PM, Michał Kępień wrote:
>>
>> 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>

Pushed to testing, thanks.

>
> The patch, on top of previous patches, is tested on Latitude 7480
>
> Reviewed-and-tested-by: Alex Hung <alex.hung@canonical.com>

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).

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-13 16:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-09  9:36 [PATCH] platform/x86: intel-hid: do not set parents of input devices explicitly Michał Kępień
2017-03-13 10:37 ` Alex Hung
2017-03-13 16:17   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®