From: Axel Lin Date: Thu, 11 Nov 2010 22:05:26 +0000 (-0800) Subject: drivers/video/backlight/s6e63m0.c: unregister backlight device and remove sysfs attri... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d974e00b955ee390e02ae2f0eeb5ed921599ec07;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git drivers/video/backlight/s6e63m0.c: unregister backlight device and remove sysfs attribute file in s6e63m0_remove s6e63m0_probe() registered backlight device and create sysfs attribute files, thus s6e63m0_remove() should unregister backlight device and remove sysfs attribute files. Signed-off-by: Axel Lin Acked-by: Richard Purdie Cc: InKi Dae Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/backlight/s6e63m0.c b/drivers/video/backlight/s6e63m0.c index 2d8328691df..78bcdb17669 100644 --- a/drivers/video/backlight/s6e63m0.c +++ b/drivers/video/backlight/s6e63m0.c @@ -829,6 +829,9 @@ static int __devexit s6e63m0_remove(struct spi_device *spi) struct s6e63m0 *lcd = dev_get_drvdata(&spi->dev); s6e63m0_power(lcd, FB_BLANK_POWERDOWN); + device_remove_file(&spi->dev, &dev_attr_gamma_table); + device_remove_file(&spi->dev, &dev_attr_gamma_mode); + backlight_device_unregister(lcd->bd); lcd_device_unregister(lcd->ld); kfree(lcd);