From ed3a6787bfff125a7aee88e5be0e0661887dfd15 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 11 Nov 2010 14:05:25 -0800 Subject: drivers/video/backlight/s6e63m0.c: set permissions on gamma_table file to 0444 gamma_table is not writable, so set permissions to 0444. Signed-off-by: Axel Lin Acked-by: Richard Purdie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/backlight/s6e63m0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video/backlight/s6e63m0.c') diff --git a/drivers/video/backlight/s6e63m0.c b/drivers/video/backlight/s6e63m0.c index a3128c9cb7a..2d8328691df 100644 --- a/drivers/video/backlight/s6e63m0.c +++ b/drivers/video/backlight/s6e63m0.c @@ -729,7 +729,7 @@ static ssize_t s6e63m0_sysfs_show_gamma_table(struct device *dev, return strlen(buf); } -static DEVICE_ATTR(gamma_table, 0644, +static DEVICE_ATTR(gamma_table, 0444, s6e63m0_sysfs_show_gamma_table, NULL); static int __init s6e63m0_probe(struct spi_device *spi) -- cgit v1.2.3-70-g09d2 From d974e00b955ee390e02ae2f0eeb5ed921599ec07 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 11 Nov 2010 14:05:26 -0800 Subject: 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 --- drivers/video/backlight/s6e63m0.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/video/backlight/s6e63m0.c') 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); -- cgit v1.2.3-70-g09d2 From a1025e224c518dceb342d0cc54e5513c6476f60c Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 11 Nov 2010 14:05:27 -0800 Subject: drivers/video/backlight/s6e63m0.c: fix section mismatch Eliminate section mismatch warning by marking s6e63m0_probe() as __devinit. Signed-off-by: Axel Lin Acked-by: Richard Purdie Cc: InKi Dae Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/backlight/s6e63m0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video/backlight/s6e63m0.c') diff --git a/drivers/video/backlight/s6e63m0.c b/drivers/video/backlight/s6e63m0.c index 78bcdb17669..5927db0da99 100644 --- a/drivers/video/backlight/s6e63m0.c +++ b/drivers/video/backlight/s6e63m0.c @@ -732,7 +732,7 @@ static ssize_t s6e63m0_sysfs_show_gamma_table(struct device *dev, static DEVICE_ATTR(gamma_table, 0444, s6e63m0_sysfs_show_gamma_table, NULL); -static int __init s6e63m0_probe(struct spi_device *spi) +static int __devinit s6e63m0_probe(struct spi_device *spi) { int ret = 0; struct s6e63m0 *lcd = NULL; -- cgit v1.2.3-70-g09d2