Commit 04c59abd authored by Ping Cheng's avatar Ping Cheng Committed by Dmitry Torokhov

Input: wacom - make LED status readable through sysfs

Reviewed-by: default avatarEduard Hasenleithner <eduard@hasenleithner.at>
Tested-by: default avatarEduard Hasenleithner <eduard@hasenleithner.at>
Signed-off-by: default avatarPing Cheng <pingc@wacom.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 09e7d941
......@@ -584,7 +584,14 @@ static ssize_t wacom_led##SET_ID##_select_store(struct device *dev, \
{ \
return wacom_led_select_store(dev, SET_ID, buf, count); \
} \
static DEVICE_ATTR(status_led##SET_ID##_select, S_IWUSR, NULL, \
static ssize_t wacom_led##SET_ID##_select_show(struct device *dev, \
struct device_attribute *attr, char *buf) \
{ \
struct wacom *wacom = dev_get_drvdata(dev); \
return snprintf(buf, 2, "%d\n", wacom->led.select[SET_ID]); \
} \
static DEVICE_ATTR(status_led##SET_ID##_select, S_IWUSR | S_IRUSR, \
wacom_led##SET_ID##_select_show, \
wacom_led##SET_ID##_select_store)
DEVICE_LED_SELECT_ATTR(0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment