[PATCH] backlight: ams369fg06: unregister backlight device whenunload the module

From: Axel Lin
Date: Mon Jul 04 2011 - 10:34:45 EST


Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>
---
drivers/video/backlight/ams369fg06.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/video/backlight/ams369fg06.c b/drivers/video/backlight/ams369fg06.c
index d1d8237..6462d05 100644
--- a/drivers/video/backlight/ams369fg06.c
+++ b/drivers/video/backlight/ams369fg06.c
@@ -553,6 +553,7 @@ static int __devexit ams369fg06_remove(struct spi_device *spi)
struct ams369fg06 *lcd = dev_get_drvdata(&spi->dev);

ams369fg06_power(lcd, FB_BLANK_POWERDOWN);
+ backlight_device_unregister(lcd->bd);
lcd_device_unregister(lcd->ld);
kfree(lcd);

--
1.7.4.1



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/