summaryrefslogtreecommitdiffstats
path: root/drivers/leds/led-triggers.c
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2007-07-09 00:19:31 +0200
committerRichard Purdie <rpurdie@rpsys.net>2007-07-16 02:15:51 +0200
commitf8a7c6fe14f556ca8eeddce258cb21392d0c3a2f (patch)
tree517e178330a46186e6bbd09ba60e453ce32ca485 /drivers/leds/led-triggers.c
parentleds: leds-gpio for ngw100 (diff)
downloadlinux-f8a7c6fe14f556ca8eeddce258cb21392d0c3a2f.tar.xz
linux-f8a7c6fe14f556ca8eeddce258cb21392d0c3a2f.zip
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 @@
/*
* LED Triggers Core
*
- * Copyright 2005-2006 Openedhand Ltd.
+ * Copyright 2005-2007 Openedhand Ltd.
*
* Author: Richard Purdie <rpurdie@openedhand.com>
*
@@ -28,10 +28,10 @@
static DEFINE_RWLOCK(triggers_list_lock);
static LIST_HEAD(trigger_list);
-ssize_t led_trigger_store(struct class_device *dev, const char *buf,
- size_t count)
+ssize_t led_trigger_store(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count)
{
- struct led_classdev *led_cdev = class_get_devdata(dev);
+ struct led_classdev *led_cdev = dev_get_drvdata(dev);
char trigger_name[TRIG_NAME_MAX];
struct led_trigger *trig;
size_t len;
@@ -67,9 +67,10 @@ ssize_t led_trigger_store(struct class_device *dev, const char *buf,
}
-ssize_t led_trigger_show(struct class_device *dev, char *buf)
+ssize_t led_trigger_show(struct device *dev, struct device_attribute *attr,
+ char *buf)
{
- struct led_classdev *led_cdev = class_get_devdata(dev);
+ struct led_classdev *led_cdev = dev_get_drvdata(dev);
struct led_trigger *trig;
int len = 0;