aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorJacek Anaszewski <j.anaszewski@samsung.com>2014-08-07 08:10:24 -0400
committerBryan Wu <cooloney@gmail.com>2014-09-11 19:55:26 -0400
commit3841961269f76db243339a94005729f10829911e (patch)
tree9345836b1fef2fb1ecfdad4a04938e5034c1a3ac /drivers/leds
parentd8082827d8a214343b761f2c4554d2a7d1573d63 (diff)
leds: avoid using DEVICE_ATTR macro for max_brightness attribute
Make definition of the brightness related sysfs attributes consistent. The modification entails change of the function name: led_max_brightness_show -> max_brightness_show Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/led-class.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index 4bd4572efe6e..71666a40b79a 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -60,14 +60,14 @@ static ssize_t brightness_store(struct device *dev,
60} 60}
61static DEVICE_ATTR_RW(brightness); 61static DEVICE_ATTR_RW(brightness);
62 62
63static ssize_t led_max_brightness_show(struct device *dev, 63static ssize_t max_brightness_show(struct device *dev,
64 struct device_attribute *attr, char *buf) 64 struct device_attribute *attr, char *buf)
65{ 65{
66 struct led_classdev *led_cdev = dev_get_drvdata(dev); 66 struct led_classdev *led_cdev = dev_get_drvdata(dev);
67 67
68 return sprintf(buf, "%u\n", led_cdev->max_brightness); 68 return sprintf(buf, "%u\n", led_cdev->max_brightness);
69} 69}
70static DEVICE_ATTR(max_brightness, 0444, led_max_brightness_show, NULL); 70static DEVICE_ATTR_RO(max_brightness);
71 71
72#ifdef CONFIG_LEDS_TRIGGERS 72#ifdef CONFIG_LEDS_TRIGGERS
73static DEVICE_ATTR(trigger, 0644, led_trigger_show, led_trigger_store); 73static DEVICE_ATTR(trigger, 0644, led_trigger_show, led_trigger_store);