Skip to content

Commit e24aeff

Browse files
bebarinoJiri Kosina
authored andcommitted
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>
1 parent 3fe6acd commit e24aeff

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/hid/hid-vivaldi.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@
66
* Author: Sean O'Brien <seobrien@chromium.org>
77
*/
88

9+
#include <linux/device.h>
910
#include <linux/hid.h>
11+
#include <linux/kernel.h>
1012
#include <linux/module.h>
13+
#include <linux/sysfs.h>
1114

1215
#define MIN_FN_ROW_KEY 1
1316
#define MAX_FN_ROW_KEY 24
1417
#define HID_VD_FN_ROW_PHYSMAP 0x00000001
1518
#define HID_USAGE_FN_ROW_PHYSMAP (HID_UP_GOOGLEVENDOR | HID_VD_FN_ROW_PHYSMAP)
1619

17-
static struct hid_driver hid_vivaldi;
18-
1920
struct vivaldi_data {
2021
u32 function_row_physmap[MAX_FN_ROW_KEY - MIN_FN_ROW_KEY + 1];
2122
int max_function_row_key;
@@ -40,7 +41,7 @@ static ssize_t function_row_physmap_show(struct device *dev,
4041
return size;
4142
}
4243

43-
DEVICE_ATTR_RO(function_row_physmap);
44+
static DEVICE_ATTR_RO(function_row_physmap);
4445
static struct attribute *sysfs_attrs[] = {
4546
&dev_attr_function_row_physmap.attr,
4647
NULL

0 commit comments

Comments
 (0)