Skip to contentSkip to conversation

HID: picolcd_core: Remove setting hdev->claimed before calling hid_hw_start()

PATCH Superseded Axel Lin 2 participants 2 messages Sep 13, 2012 – Sep 17, 2012

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 HID: picolcd_core: Remove setting hdev->claimed before calling hid_hw_start()

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.

---
 drivers/hid/hid-picolcd_core.c |    4 ----
 1 file changed, 4 deletions(-)
drivers/hid/hid-picolcd_core.c +0 -4
index 8c9ec1f..e30e703 100644
@@ -583,11 +583,7 @@ static int picolcd_probe(struct hid_device *hdev,
 		goto err_cleanup_data;
 	}
 
-	/* We don't use hidinput but hid_hw_start() fails if nothing is
-	 * claimed. So spoof claimed input. */
-	hdev->claimed = HID_CLAIMED_INPUT;
 	error = hid_hw_start(hdev, 0);
-	hdev->claimed = 0;
 	if (error) {
 		hid_err(hdev, "hardware start failed\n");
 		goto err_cleanup_data;
Signature · 1 line
1.7.9.5
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · On Fri, 14 September 2012 Axel Lin <[email protected]> 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.

This same change was applied to 3.6 but got lost while applying my patches on 3.6rc.

I will what else (of 3.5 -> 3.6 changes) might have been lost while applying driver code split.

Thanks for spotting.

Bruno

Quoted 10 lines
---
 drivers/hid/hid-picolcd_core.c |    4 ----
 1 file changed, 4 deletions(-)
drivers/hid/hid-picolcd_core.c +0 -0
index 8c9ec1f..e30e703 100644
@@ -583,11 +583,7 @@ static int picolcd_probe(struct hid_device *hdev,
 		goto err_cleanup_data;

drivers/hid/hid-picolcd_core.c static int picolcd_probe(struct hid_device *hdev, · line 589

Quoted 10 lines
drivers/hid/hid-picolcd_core.c +0 -4
 	}
 
-	/* We don't use hidinput but hid_hw_start() fails if nothing is
-	 * claimed. So spoof claimed input. */
-	hdev->claimed = HID_CLAIMED_INPUT;
 	error = hid_hw_start(hdev, 0);
-	hdev->claimed = 0;
 	if (error) {
 		hid_err(hdev, "hardware start failed\n");
 		goto err_cleanup_data;

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html