aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet
diff options
context:
space:
mode:
authorPing Cheng <pinglinux@gmail.com>2011-10-05 02:51:49 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-10-05 03:26:24 -0400
commit04c59abd3c053f9a42437d5db3af4383cf68659c (patch)
treec0445aec0cd582120f9c5530c96fe39656ce824e /drivers/input/tablet
parent09e7d9410764f96f83ebf4a435028ac5e6240af6 (diff)
Input: wacom - make LED status readable through sysfs
Reviewed-by: Eduard Hasenleithner <eduard@hasenleithner.at> Tested-by: Eduard Hasenleithner <eduard@hasenleithner.at> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/tablet')
-rw-r--r--drivers/input/tablet/wacom_sys.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index abe5920e2cdb..a205055a4c51 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -584,7 +584,14 @@ static ssize_t wacom_led##SET_ID##_select_store(struct device *dev, \
584{ \ 584{ \
585 return wacom_led_select_store(dev, SET_ID, buf, count); \ 585 return wacom_led_select_store(dev, SET_ID, buf, count); \
586} \ 586} \
587static DEVICE_ATTR(status_led##SET_ID##_select, S_IWUSR, NULL, \ 587static ssize_t wacom_led##SET_ID##_select_show(struct device *dev, \
588 struct device_attribute *attr, char *buf) \
589{ \
590 struct wacom *wacom = dev_get_drvdata(dev); \
591 return snprintf(buf, 2, "%d\n", wacom->led.select[SET_ID]); \
592} \
593static DEVICE_ATTR(status_led##SET_ID##_select, S_IWUSR | S_IRUSR, \
594 wacom_led##SET_ID##_select_show, \
588 wacom_led##SET_ID##_select_store) 595 wacom_led##SET_ID##_select_store)
589 596
590DEVICE_LED_SELECT_ATTR(0); 597DEVICE_LED_SELECT_ATTR(0);