Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1599186

Re: [PATCH] platform/x86: intel-hid: do not set parents of input devices explicitly

From Alex Hung <alex.hung@canonical.com>
Newsgroups linux.kernel
Subject Re: [PATCH] platform/x86: intel-hid: do not set parents of input devices explicitly
Date 2017-03-13 11:40 +0100
Message-ID <tkvyp-7D9-3@gated-at.bofh.it> (permalink)
References <tj3bb-3I3-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] platform/x86: intel-hid: do not set parents of input devices explicitly Michał Kępień <kernel@kempniu.pl> - 2017-03-09 11:10 +0100
  Re: [PATCH] platform/x86: intel-hid: do not set parents of input  devices explicitly Alex Hung <alex.hung@canonical.com> - 2017-03-13 11:40 +0100
    Re: [PATCH] platform/x86: intel-hid: do not set parents of input  devices explicitly Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-03-13 17:20 +0100

csiph-web