summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-lg4ff.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-02-10 18:29:38 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-10 18:29:38 -0800
commit870fd0f5df4e131467612cc46db46fc3b69fd706 (patch)
treeb7747c644003da42ec9d4265fa4a9cc6b9fb7297 /drivers/hid/hid-lg4ff.c
parent06cc01a0dea523b5c9acfd1ed276648c54012912 (diff)
parent988b7fb0bfc215476c3a0a623b442cd0e29ce4c0 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID updates from Jiri Kosina: "Updates for HID code - improveements of Logitech HID++ procotol implementation, from Benjamin Tissoires - support for composite RMI devices, from Andrew Duggan - new driver for BETOP controller, from Huang Bo - fixup for conflicting mapping in HID core between PC-101/103/104 and PC-102/105 keyboards from David Herrmann - new hardware support and fixes in Wacom driver, from Ping Cheng - assorted small fixes and device ID additions all over the place" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (33 commits) HID: wacom: add support for Cintiq 27QHD and 27QHD touch HID: wacom: consolidate input capability settings for pen and touch HID: wacom: make sure touch arbitration is applied consistently HID: pidff: Fix initialisation forMicrosoft Sidewinder FF Pro 2 HID: hyperv: match wait_for_completion_timeout return type HID: wacom: Report ABS_MISC event for Cintiq Companion Hybrid HID: Use Kbuild idiom in Makefiles HID: do not bind to Microchip Pick16F1454 HID: hid-lg4ff: use DEVICE_ATTR_RW macro HID: hid-lg4ff: fix sysfs attribute permission HID: wacom: peport In Range event according to the spec HID: wacom: process invalid Cintiq and Intuos data in wacom_intuos_inout() HID: rmi: Add support for the touchpad in the Razer Blade 14 laptop HID: rmi: Support touchpads with external buttons HID: rmi: Use hid_report_len to compute the size of reports HID: logitech-hidpp: store the name of the device in struct hidpp HID: microsoft: add support for Japanese Surface Type Cover 3 HID: fixup the conflicting keyboard mappings quirk HID: apple: fix battery support for the 2009 ANSI wireless keyboard HID: fix Kconfig text ...
Diffstat (limited to 'drivers/hid/hid-lg4ff.c')
-rw-r--r--drivers/hid/hid-lg4ff.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/hid/hid-lg4ff.c b/drivers/hid/hid-lg4ff.c
index 7835717bc020..db0dd9b17e53 100644
--- a/drivers/hid/hid-lg4ff.c
+++ b/drivers/hid/hid-lg4ff.c
@@ -49,10 +49,6 @@
static void hid_lg4ff_set_range_dfp(struct hid_device *hid, u16 range);
static void hid_lg4ff_set_range_g25(struct hid_device *hid, u16 range);
-static ssize_t lg4ff_range_show(struct device *dev, struct device_attribute *attr, char *buf);
-static ssize_t lg4ff_range_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count);
-
-static DEVICE_ATTR(range, S_IRWXU | S_IRWXG | S_IROTH, lg4ff_range_show, lg4ff_range_store);
struct lg4ff_device_entry {
__u32 product_id;
@@ -416,7 +412,8 @@ static void hid_lg4ff_switch_native(struct hid_device *hid, const struct lg4ff_n
}
/* Read current range and display it in terminal */
-static ssize_t lg4ff_range_show(struct device *dev, struct device_attribute *attr, char *buf)
+static ssize_t range_show(struct device *dev, struct device_attribute *attr,
+ char *buf)
{
struct hid_device *hid = to_hid_device(dev);
struct lg4ff_device_entry *entry;
@@ -441,7 +438,8 @@ static ssize_t lg4ff_range_show(struct device *dev, struct device_attribute *att
/* Set range to user specified value, call appropriate function
* according to the type of the wheel */
-static ssize_t lg4ff_range_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
+static ssize_t range_store(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count)
{
struct hid_device *hid = to_hid_device(dev);
struct lg4ff_device_entry *entry;
@@ -472,6 +470,7 @@ static ssize_t lg4ff_range_store(struct device *dev, struct device_attribute *at
return count;
}
+static DEVICE_ATTR_RW(range);
#ifdef CONFIG_LEDS_CLASS
static void lg4ff_set_leds(struct hid_device *hid, __u8 leds)