X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=drivers%2Fleds%2Fleds-s3c24xx.c;h=4d81131542ae68e71e203dae1f9e63194547ffef;hb=ce70a24575414d615f6a7a05caf9b7e8f91a1b6f;hp=50914439d861d74072bf9af8d7ac0024469eb2fe;hpb=34f1ca540679f61a02b7406f036d9edde9717ee2;p=safe%2Fjmp%2Flinux-2.6 diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c index 5091443..4d81131 100644 --- a/drivers/leds/leds-s3c24xx.c +++ b/drivers/leds/leds-s3c24xx.c @@ -16,9 +16,9 @@ #include #include -#include -#include -#include +#include +#include +#include /* our context */ @@ -43,7 +43,7 @@ static void s3c24xx_led_set(struct led_classdev *led_cdev, struct s3c24xx_gpio_led *led = to_gpio(led_cdev); struct s3c24xx_led_platdata *pd = led->pdata; - /* there will be a sort delay between setting the output and + /* there will be a short delay between setting the output and * going from output to input when using tristate. */ s3c2410_gpio_setpin(pd->gpio, (value ? 1 : 0) ^ @@ -51,7 +51,7 @@ static void s3c24xx_led_set(struct led_classdev *led_cdev, if (pd->flags & S3C24XX_LEDF_TRISTATE) s3c2410_gpio_cfgpin(pd->gpio, - value ? S3C2410_GPIO_OUTPUT : S3C2410_GPIO_INPUT); + value ? S3C2410_GPIO_OUTPUT : S3C2410_GPIO_INPUT); } @@ -82,6 +82,7 @@ static int s3c24xx_led_probe(struct platform_device *dev) led->cdev.brightness_set = s3c24xx_led_set; led->cdev.default_trigger = pdata->def_trigger; led->cdev.name = pdata->name; + led->cdev.flags |= LED_CORE_SUSPENDRESUME; led->pdata = pdata; @@ -111,33 +112,9 @@ static int s3c24xx_led_probe(struct platform_device *dev) return ret; } - -#ifdef CONFIG_PM -static int s3c24xx_led_suspend(struct platform_device *dev, pm_message_t state) -{ - struct s3c24xx_gpio_led *led = pdev_to_gpio(dev); - - led_classdev_suspend(&led->cdev); - return 0; -} - -static int s3c24xx_led_resume(struct platform_device *dev) -{ - struct s3c24xx_gpio_led *led = pdev_to_gpio(dev); - - led_classdev_resume(&led->cdev); - return 0; -} -#else -#define s3c24xx_led_suspend NULL -#define s3c24xx_led_resume NULL -#endif - static struct platform_driver s3c24xx_led_driver = { .probe = s3c24xx_led_probe, .remove = s3c24xx_led_remove, - .suspend = s3c24xx_led_suspend, - .resume = s3c24xx_led_resume, .driver = { .name = "s3c24xx_led", .owner = THIS_MODULE, @@ -151,7 +128,7 @@ static int __init s3c24xx_led_init(void) static void __exit s3c24xx_led_exit(void) { - platform_driver_unregister(&s3c24xx_led_driver); + platform_driver_unregister(&s3c24xx_led_driver); } module_init(s3c24xx_led_init); @@ -160,3 +137,4 @@ module_exit(s3c24xx_led_exit); MODULE_AUTHOR("Ben Dooks "); MODULE_DESCRIPTION("S3C24XX LED driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:s3c24xx_led");