Skip to content

Commit

Permalink
drivers/leds: correct __devexit annotations
Browse files Browse the repository at this point in the history
__devexit functions are discarded without CONFIG_HOTPLUG, so they need
to be referenced carefully.  A __devexit function may also not be called
from a __devinit function.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Bryan Wu <bryan.wu@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
arndb authored and torvalds committed May 10, 2012
1 parent 8c75776 commit b8cd742
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions drivers/leds/leds-netxbig.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static int __devinit gpio_ext_init(struct netxbig_gpio_ext *gpio_ext)
return err;
}

static void __devexit gpio_ext_free(struct netxbig_gpio_ext *gpio_ext)
static void gpio_ext_free(struct netxbig_gpio_ext *gpio_ext)
{
int i;

Expand Down Expand Up @@ -294,7 +294,7 @@ static ssize_t netxbig_led_sata_show(struct device *dev,

static DEVICE_ATTR(sata, 0644, netxbig_led_sata_show, netxbig_led_sata_store);

static void __devexit delete_netxbig_led(struct netxbig_led_data *led_dat)
static void delete_netxbig_led(struct netxbig_led_data *led_dat)
{
if (led_dat->mode_val[NETXBIG_LED_SATA] != NETXBIG_LED_INVALID_MODE)
device_remove_file(led_dat->cdev.dev, &dev_attr_sata);
Expand Down
2 changes: 1 addition & 1 deletion drivers/leds/leds-ns2.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ create_ns2_led(struct platform_device *pdev, struct ns2_led_data *led_dat,
return ret;
}

static void __devexit delete_ns2_led(struct ns2_led_data *led_dat)
static void delete_ns2_led(struct ns2_led_data *led_dat)
{
device_remove_file(led_dat->cdev.dev, &dev_attr_sata);
led_classdev_unregister(&led_dat->cdev);
Expand Down

0 comments on commit b8cd742

Please sign in to comment.