diff options
author | Stephen Boyd <swboyd@chromium.org> | 2022-01-07 15:23:05 -0800 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2022-01-14 11:52:13 +0100 |
commit | e24aeff6db738be7ce24999a41e91299b5fe14be (patch) | |
tree | 89622cd62406c20f42f2b2f63416070b61f98b12 /drivers/hid | |
parent | 3fe6acd4dc922237b30e55473c9349c6ce0690f3 (diff) | |
download | linux-e24aeff6db738be7ce24999a41e91299b5fe14be.tar.bz2 |
HID: vivaldi: Minor cleanups
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>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-vivaldi.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/hid/hid-vivaldi.c b/drivers/hid/hid-vivaldi.c index 576518e704ee..efa6140915f4 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 |