Message ID | 1347929533.6562.0.camel@phoenix (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Jiri Kosina |
Headers | show |
On Tue, 18 Sep 2012, Axel Lin wrote: > 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@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Jonathan, please take it on top of the other changes. Thanks. > --- > 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 4ac759c..1faacf2 100644 > --- a/drivers/hid/hid-sensor-hub.c > +++ b/drivers/hid/hid-sensor-hub.c > @@ -539,7 +539,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"); > @@ -627,7 +626,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); > -- > 1.7.9.5 > > >
I felt subject line was too long. Minor change in subject line. Tested and added my ack for both of these patches. Thanks, Srinivas -----Original Message----- From: Jiri Kosina [mailto:jkosina@suse.cz] Sent: Wednesday, September 19, 2012 4:46 AM To: Axel Lin Cc: Jonathan Cameron; Pandruvada, Srinivas; linux-input@vger.kernel.org Subject: Re: [PATCH RESEND 1/2] HID: hid-sensor-hub: Remove setting hdev->claimed before calling hid_hw_start() On Tue, 18 Sep 2012, Axel Lin wrote: > 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@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Jonathan, please take it on top of the other changes. Thanks. > --- > 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 4ac759c..1faacf2 100644 > --- a/drivers/hid/hid-sensor-hub.c > +++ b/drivers/hid/hid-sensor-hub.c > @@ -539,7 +539,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"); @@ -627,7 +626,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); > -- > 1.7.9.5 > > > -- Jiri Kosina SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index 4ac759c..1faacf2 100644 --- a/drivers/hid/hid-sensor-hub.c +++ b/drivers/hid/hid-sensor-hub.c @@ -539,7 +539,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"); @@ -627,7 +626,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);
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@gmail.com> --- drivers/hid/hid-sensor-hub.c | 2 -- 1 file changed, 2 deletions(-)