mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] s6e63m0: unregister backlight device and remove sysfs attribute file in s6e63m0_remove
@ 2010-07-28  3:06 Axel Lin
  0 siblings, 0 replies; only message in thread
From: Axel Lin @ 2010-07-28  3:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Richard Purdie, Andrew Morton, InKi Dae

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 <axel.lin@gmail.com>
---
 drivers/video/backlight/s6e63m0.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/video/backlight/s6e63m0.c b/drivers/video/backlight/s6e63m0.c
index a3128c9..b27ccf9 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);
 
-- 
1.5.4.3




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-07-28  3:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-28  3:06 [PATCH 1/2] s6e63m0: unregister backlight device and remove sysfs attribute file in s6e63m0_remove Axel Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®