Skip to contentSkip to conversation

HID: hid-lcpower: Use HID_UP_LOGIVENDOR instead of hard coded 0x0ffbc0000

PATCH In review Axel Lin 2 participants 2 messages Sep 5, 2012 HID

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 HID: hid-lcpower: Use HID_UP_LOGIVENDOR instead of hard coded 0x0ffbc0000

---
 drivers/hid/hid-lcpower.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-lcpower.c +1 -1
index c4fe9bd0..22bc14a 100644
@@ -24,7 +24,7 @@ static int ts_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 		struct hid_field *field, struct hid_usage *usage,
 		unsigned long **bit, int *max)
 {
-	if ((usage->hid & HID_USAGE_PAGE) != 0x0ffbc0000)
+	if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR)
 		return 0;
 
 	switch (usage->hid & HID_USAGE) {
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 10 lines · Axel Lin
---
 drivers/hid/hid-lcpower.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-lcpower.c +0 -0
index c4fe9bd0..22bc14a 100644

drivers/hid/hid-lcpower.c static int ts_input_mapping(struct hid_device *hdev, struct hid_input *hi, · line 30

Quoted 8 lines
drivers/hid/hid-lcpower.c +1 -1
@@ -24,7 +24,7 @@ static int ts_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 		struct hid_field *field, struct hid_usage *usage,
 		unsigned long **bit, int *max)
 {
-	if ((usage->hid & HID_USAGE_PAGE) != 0x0ffbc0000)
+	if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR)
 		return 0;
 
 	switch (usage->hid & HID_USAGE) {

The name of the actual constant is quite losing its point with more and more non-Logitech devices using this usage page.

I am applying your patch now, but I guess we'll rather rename the define in a near future.

Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs