* [PATCH] HID: ezkey: Fix trailing statements error style and blank line after declarations warning style.
@ 2021-02-12 3:49 Akash Melachuri
0 siblings, 0 replies; 2+ messages in thread
From: Akash Melachuri @ 2021-02-12 3:49 UTC (permalink / raw)
To: jikos; +Cc: linux-kernel, linux-input
This patch fixes the checkpatch.pl errors and warnings:
ERROR: trailing statements should be on next line
ERROR: trailing statements should be on next line
ERROR: trailing statements should be on next line
WARNING: Missing a blank line after declarations
Signed-off-by: Akash Melachuri <amelachuri@gmail.com>
---
drivers/hid/hid-ezkey.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/hid/hid-ezkey.c b/drivers/hid/hid-ezkey.c
index d14f91d78c96..8fa568ac79f9 100644
--- a/drivers/hid/hid-ezkey.c
+++ b/drivers/hid/hid-ezkey.c
@@ -30,14 +30,20 @@ static int ez_input_mapping(struct hid_device *hdev, struct hid_input *hi,
return 0;
switch (usage->hid & HID_USAGE) {
- case 0x230: ez_map_key(BTN_MOUSE); break;
- case 0x231: ez_map_rel(REL_WHEEL); break;
+ case 0x230:
+ ez_map_key(BTN_MOUSE);
+ break;
+ case 0x231:
+ ez_map_rel(REL_WHEEL);
+ break;
/*
* this keyboard has a scrollwheel implemented in
* totally broken way. We map this usage temporarily
* to HWHEEL and handle it in the event quirk handler
*/
- case 0x232: ez_map_rel(REL_HWHEEL); break;
+ case 0x232:
+ ez_map_rel(REL_HWHEEL);
+ break;
default:
return 0;
}
@@ -54,6 +60,7 @@ static int ez_event(struct hid_device *hdev, struct hid_field *field,
/* handle the temporary quirky mapping to HWHEEL */
if (usage->type == EV_REL && usage->code == REL_HWHEEL) {
struct input_dev *input = field->hidinput->input;
+
input_event(input, usage->type, REL_WHEEL, -value);
return 1;
}
--
2.30.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] HID: ezkey: Fix trailing statements error style and blank line after declarations warning style.
@ 2021-02-21 22:12 Akash Melachuri
0 siblings, 0 replies; 2+ messages in thread
From: Akash Melachuri @ 2021-02-21 22:12 UTC (permalink / raw)
To: benjamin.tissoires; +Cc: linux-kernel, linux-input
This patch fixes the checkpatch.pl errors and warnings:
ERROR: trailing statements should be on next line
ERROR: trailing statements should be on next line
ERROR: trailing statements should be on next line
WARNING: Missing a blank line after declarations
Signed-off-by: Akash Melachuri <amelachuri@gmail.com>
---
drivers/hid/hid-ezkey.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/hid/hid-ezkey.c b/drivers/hid/hid-ezkey.c
index d14f91d78c96..8fa568ac79f9 100644
--- a/drivers/hid/hid-ezkey.c
+++ b/drivers/hid/hid-ezkey.c
@@ -30,14 +30,20 @@ static int ez_input_mapping(struct hid_device *hdev, struct hid_input *hi,
return 0;
switch (usage->hid & HID_USAGE) {
- case 0x230: ez_map_key(BTN_MOUSE); break;
- case 0x231: ez_map_rel(REL_WHEEL); break;
+ case 0x230:
+ ez_map_key(BTN_MOUSE);
+ break;
+ case 0x231:
+ ez_map_rel(REL_WHEEL);
+ break;
/*
* this keyboard has a scrollwheel implemented in
* totally broken way. We map this usage temporarily
* to HWHEEL and handle it in the event quirk handler
*/
- case 0x232: ez_map_rel(REL_HWHEEL); break;
+ case 0x232:
+ ez_map_rel(REL_HWHEEL);
+ break;
default:
return 0;
}
@@ -54,6 +60,7 @@ static int ez_event(struct hid_device *hdev, struct hid_field *field,
/* handle the temporary quirky mapping to HWHEEL */
if (usage->type == EV_REL && usage->code == REL_HWHEEL) {
struct input_dev *input = field->hidinput->input;
+
input_event(input, usage->type, REL_WHEEL, -value);
return 1;
}
--
2.30.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-21 22:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-12 3:49 [PATCH] HID: ezkey: Fix trailing statements error style and blank line after declarations warning style Akash Melachuri
2021-02-21 22:12 Akash Melachuri
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).