* [PATCH] HID: vivaldi: Minor cleanups
@ 2022-01-07 23:23 Stephen Boyd
2022-01-14 10:52 ` Jiri Kosina
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Boyd @ 2022-01-07 23:23 UTC (permalink / raw)
To: Jiri Kosina, Benjamin Tissoires
Cc: linux-kernel, linux-input, Sean O'Brien, Ting Shen
Perform some minor cleanups on this driver. Include header files for
struct definitions that are used, drop a forward declaration that isn't
useful, and mark a sysfs attribute static as it isn't used outside this
file.
Cc: Sean O'Brien <seobrien@chromium.org>
Cc: Ting Shen <phoenixshen@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---
drivers/hid/hid-vivaldi.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/hid/hid-vivaldi.c b/drivers/hid/hid-vivaldi.c
index cd7ada48b1d9..90ebb33380b7 100644
--- a/drivers/hid/hid-vivaldi.c
+++ b/drivers/hid/hid-vivaldi.c
@@ -6,16 +6,17 @@
* Author: Sean O'Brien <seobrien@chromium.org>
*/
+#include <linux/device.h>
#include <linux/hid.h>
+#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/sysfs.h>
#define MIN_FN_ROW_KEY 1
#define MAX_FN_ROW_KEY 24
#define HID_VD_FN_ROW_PHYSMAP 0x00000001
#define HID_USAGE_FN_ROW_PHYSMAP (HID_UP_GOOGLEVENDOR | HID_VD_FN_ROW_PHYSMAP)
-static struct hid_driver hid_vivaldi;
-
struct vivaldi_data {
u32 function_row_physmap[MAX_FN_ROW_KEY - MIN_FN_ROW_KEY + 1];
int max_function_row_key;
@@ -40,7 +41,7 @@ static ssize_t function_row_physmap_show(struct device *dev,
return size;
}
-DEVICE_ATTR_RO(function_row_physmap);
+static DEVICE_ATTR_RO(function_row_physmap);
static struct attribute *sysfs_attrs[] = {
&dev_attr_function_row_physmap.attr,
NULL
base-commit: 136057256686de39cc3a07c2e39ef6bc43003ff6
--
https://chromeos.dev
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] HID: vivaldi: Minor cleanups
2022-01-07 23:23 [PATCH] HID: vivaldi: Minor cleanups Stephen Boyd
@ 2022-01-14 10:52 ` Jiri Kosina
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2022-01-14 10:52 UTC (permalink / raw)
To: Stephen Boyd
Cc: Benjamin Tissoires, linux-kernel, linux-input, Sean O'Brien,
Ting Shen
On Fri, 7 Jan 2022, Stephen Boyd wrote:
> Perform some minor cleanups on this driver. Include header files for
> struct definitions that are used, drop a forward declaration that isn't
> useful, and mark a sysfs attribute static as it isn't used outside this
> file.
>
> Cc: Sean O'Brien <seobrien@chromium.org>
> Cc: Ting Shen <phoenixshen@chromium.org>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Applied to hid.git#for-5.17/upstream-fixes
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-14 10:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 23:23 [PATCH] HID: vivaldi: Minor cleanups Stephen Boyd
2022-01-14 10:52 ` Jiri Kosina
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).