aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/led-triggers.c
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2007-07-08 18:19:31 -0400
committerRichard Purdie <rpurdie@rpsys.net>2007-07-15 20:15:51 -0400
commitf8a7c6fe14f556ca8eeddce258cb21392d0c3a2f (patch)
tree517e178330a46186e6bbd09ba60e453ce32ca485 /drivers/leds/led-triggers.c
parentf9f451d9cac24b9bd49947d1c6971f3d689381fa (diff)
leds: Convert from struct class_device to struct device
Convert the LEDs class from struct class_device to struct device since class_device is scheduled for removal. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/leds/led-triggers.c')
-rw-r--r--drivers/leds/led-triggers.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
index b2438a03082b..575368c2b100 100644
--- a/drivers/leds/led-triggers.c
+++ b/drivers/leds/led-triggers.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * LED Triggers Core 2 * LED Triggers Core
3 * 3 *
4 * Copyright 2005-2006 Openedhand Ltd. 4 * Copyright 2005-2007 Openedhand Ltd.
5 * 5 *
6 * Author: Richard Purdie <rpurdie@openedhand.com> 6 * Author: Richard Purdie <rpurdie@openedhand.com>
7 * 7 *
@@ -28,10 +28,10 @@
28static DEFINE_RWLOCK(triggers_list_lock); 28static DEFINE_RWLOCK(triggers_list_lock);
29static LIST_HEAD(trigger_list); 29static LIST_HEAD(trigger_list);
30 30
31ssize_t led_trigger_store(struct class_device *dev, const char *buf, 31ssize_t led_trigger_store(struct device *dev, struct device_attribute *attr,
32 size_t count) 32 const char *buf, size_t count)
33{ 33{
34 struct led_classdev *led_cdev = class_get_devdata(dev); 34 struct led_classdev *led_cdev = dev_get_drvdata(dev);
35 char trigger_name[TRIG_NAME_MAX]; 35 char trigger_name[TRIG_NAME_MAX];
36 struct led_trigger *trig; 36 struct led_trigger *trig;
37 size_t len; 37 size_t len;
@@ -67,9 +67,10 @@ ssize_t led_trigger_store(struct class_device *dev, const char *buf,
67} 67}
68 68
69 69
70ssize_t led_trigger_show(struct class_device *dev, char *buf) 70ssize_t led_trigger_show(struct device *dev, struct device_attribute *attr,
71 char *buf)
71{ 72{
72 struct led_classdev *led_cdev = class_get_devdata(dev); 73 struct led_classdev *led_cdev = dev_get_drvdata(dev);
73 struct led_trigger *trig; 74 struct led_trigger *trig;
74 int len = 0; 75 int len = 0;
75 76