aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-net48xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/leds/leds-net48xx.c')
-rw-r--r--drivers/leds/leds-net48xx.c9
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;
26static void net48xx_error_led_set(struct led_classdev *led_cdev, 27static 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
35static struct led_classdev net48xx_error_led = { 33static 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 }