Re: [PATCH 1/2] HID: hid-sensor-hub: Remove hdev->claimed setting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/19/2012 04:30 PM, Srinivas Pandruvada wrote:
> From: Axel Lin <[mailto:axel.lin@xxxxxxxxx]>
> 
> Current implementation of hid_hw_start() allows connect_mask to be 0.
> Setting hdev->claimed = HID_CLAIMED_INPUT before calling hid_hw_start()
> is not necessary. Remove it.
> 
> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>
> Acked-by: Jiri Kosina <jkosina@xxxxxxx>
> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
added to togreg branch of

git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git

> ---
>  drivers/hid/hid-sensor-hub.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
> index 80033dc..ffa91cf 100644
> --- a/drivers/hid/hid-sensor-hub.c
> +++ b/drivers/hid/hid-sensor-hub.c
> @@ -530,7 +530,6 @@ static int sensor_hub_probe(struct hid_device *hdev,
>  	}
>  	INIT_LIST_HEAD(&hdev->inputs);
>  
> -	hdev->claimed = HID_CLAIMED_INPUT;
>  	ret = hid_hw_start(hdev, 0);
>  	if (ret) {
>  		hid_err(hdev, "hw start failed\n");
> @@ -618,7 +617,6 @@ static void sensor_hub_remove(struct hid_device *hdev)
>  	int i;
>  
>  	hid_dbg(hdev, " hardware removed\n");
> -	hdev->claimed &= ~HID_CLAIMED_INPUT;
>  	hid_hw_stop(hdev);
>  	hid_hw_close(hdev);
>  	spin_lock_irqsave(&data->lock, flags);
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux