diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2007-07-08 22:19:31 (GMT) |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2007-07-16 00:15:51 (GMT) |
commit | f8a7c6fe14f556ca8eeddce258cb21392d0c3a2f (patch) | |
tree | 517e178330a46186e6bbd09ba60e453ce32ca485 /drivers/leds/led-triggers.c | |
parent | f9f451d9cac24b9bd49947d1c6971f3d689381fa (diff) | |
download | linux-f8a7c6fe14f556ca8eeddce258cb21392d0c3a2f.tar.xz |
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.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c index b2438a0..575368c 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; |