diff options
Diffstat (limited to 'drivers/leds/leds-ss4200.c')
-rw-r--r-- | drivers/leds/leds-ss4200.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/leds/leds-ss4200.c b/drivers/leds/leds-ss4200.c index 2eb3ef62962b..046cb7008745 100644 --- a/drivers/leds/leds-ss4200.c +++ b/drivers/leds/leds-ss4200.c | |||
@@ -469,6 +469,12 @@ static ssize_t nas_led_blink_store(struct device *dev, | |||
469 | 469 | ||
470 | static DEVICE_ATTR(blink, 0644, nas_led_blink_show, nas_led_blink_store); | 470 | static DEVICE_ATTR(blink, 0644, nas_led_blink_show, nas_led_blink_store); |
471 | 471 | ||
472 | static struct attribute *nasgpio_led_attrs[] = { | ||
473 | &dev_attr_blink.attr, | ||
474 | NULL | ||
475 | }; | ||
476 | ATTRIBUTE_GROUPS(nasgpio_led); | ||
477 | |||
472 | static int register_nasgpio_led(int led_nr) | 478 | static int register_nasgpio_led(int led_nr) |
473 | { | 479 | { |
474 | int ret; | 480 | int ret; |
@@ -481,20 +487,18 @@ static int register_nasgpio_led(int led_nr) | |||
481 | led->brightness = LED_FULL; | 487 | led->brightness = LED_FULL; |
482 | led->brightness_set = nasgpio_led_set_brightness; | 488 | led->brightness_set = nasgpio_led_set_brightness; |
483 | led->blink_set = nasgpio_led_set_blink; | 489 | led->blink_set = nasgpio_led_set_blink; |
490 | led->groups = nasgpio_led_groups; | ||
484 | ret = led_classdev_register(&nas_gpio_pci_dev->dev, led); | 491 | ret = led_classdev_register(&nas_gpio_pci_dev->dev, led); |
485 | if (ret) | 492 | if (ret) |
486 | return ret; | 493 | return ret; |
487 | ret = device_create_file(led->dev, &dev_attr_blink); | 494 | |
488 | if (ret) | 495 | return 0; |
489 | led_classdev_unregister(led); | ||
490 | return ret; | ||
491 | } | 496 | } |
492 | 497 | ||
493 | static void unregister_nasgpio_led(int led_nr) | 498 | static void unregister_nasgpio_led(int led_nr) |
494 | { | 499 | { |
495 | struct led_classdev *led = get_classdev_for_led_nr(led_nr); | 500 | struct led_classdev *led = get_classdev_for_led_nr(led_nr); |
496 | led_classdev_unregister(led); | 501 | led_classdev_unregister(led); |
497 | device_remove_file(led->dev, &dev_attr_blink); | ||
498 | } | 502 | } |
499 | /* | 503 | /* |
500 | * module load/initialization | 504 | * module load/initialization |