diff options
author | Chris Boot <bootc@bootc.net> | 2006-09-29 04:59:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-29 12:18:06 -0400 |
commit | cfedc920a7bca828fd4af8e203f7d8514990f999 (patch) | |
tree | bde0f40c77b9e433652492e9ffc9301506be3ea9 /drivers | |
parent | 58012cd788443b9d144bd7c72260a84b6b30f45d (diff) |
[PATCH] Make net48xx-led use scx200_gpio_ops
Make the next48xx LED code use scx200_gpio_ops instead of raw SCx200 GPIO
accesses.
Signed-off-by: Chris Boot <bootc@bootc.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/leds/leds-net48xx.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/leds/leds-net48xx.c b/drivers/leds/leds-net48xx.c index 713c4a8aa77d..45ba3d45bcb8 100644 --- a/drivers/leds/leds-net48xx.c +++ b/drivers/leds/leds-net48xx.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/leds.h> | 16 | #include <linux/leds.h> |
17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
18 | #include <asm/io.h> | 18 | #include <asm/io.h> |
19 | #include <linux/nsc_gpio.h> | ||
19 | #include <linux/scx200_gpio.h> | 20 | #include <linux/scx200_gpio.h> |
20 | 21 | ||
21 | #define DRVNAME "net48xx-led" | 22 | #define DRVNAME "net48xx-led" |
@@ -26,10 +27,7 @@ static struct platform_device *pdev; | |||
26 | static void net48xx_error_led_set(struct led_classdev *led_cdev, | 27 | static void net48xx_error_led_set(struct led_classdev *led_cdev, |
27 | enum led_brightness value) | 28 | enum led_brightness value) |
28 | { | 29 | { |
29 | if (value) | 30 | scx200_gpio_ops.gpio_set(NET48XX_ERROR_LED_GPIO, value ? 1 : 0); |
30 | scx200_gpio_set_high(NET48XX_ERROR_LED_GPIO); | ||
31 | else | ||
32 | scx200_gpio_set_low(NET48XX_ERROR_LED_GPIO); | ||
33 | } | 31 | } |
34 | 32 | ||
35 | static struct led_classdev net48xx_error_led = { | 33 | static struct led_classdev net48xx_error_led = { |
@@ -81,7 +79,8 @@ static int __init net48xx_led_init(void) | |||
81 | { | 79 | { |
82 | int ret; | 80 | int ret; |
83 | 81 | ||
84 | if (!scx200_gpio_present()) { | 82 | /* small hack, but scx200_gpio doesn't set .dev if the probe fails */ |
83 | if (!scx200_gpio_ops.dev) { | ||
85 | ret = -ENODEV; | 84 | ret = -ENODEV; |
86 | goto out; | 85 | goto out; |
87 | } | 86 | } |