summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-11-13 03:09:28 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-13 07:09:19 +0400
commit0a1c55d0212661a582e9b4688410ccf9d4b163e8 (patch)
tree6640d40ba91097d18ff1ea8a87c9e4b7d5e587cb
parent5690378efa8b232161d4cae5d9650da85c88ab1f (diff)
downloadlinux-0a1c55d0212661a582e9b4688410ccf9d4b163e8.tar.xz
backlight: lms283gf05: use devm_lcd_device_register()
Use devm_lcd_device_register() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/video/backlight/lms283gf05.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/video/backlight/lms283gf05.c b/drivers/video/backlight/lms283gf05.c
index 80b5929d4872..de8832504f68 100644
--- a/drivers/video/backlight/lms283gf05.c
+++ b/drivers/video/backlight/lms283gf05.c
@@ -173,7 +173,8 @@ static int lms283gf05_probe(struct spi_device *spi)
return -ENOMEM;
}
- ld = lcd_device_register("lms283gf05", &spi->dev, st, &lms_ops);
+ ld = devm_lcd_device_register(&spi->dev, "lms283gf05", &spi->dev, st,
+ &lms_ops);
if (IS_ERR(ld))
return PTR_ERR(ld);
@@ -190,22 +191,12 @@ static int lms283gf05_probe(struct spi_device *spi)
return 0;
}
-static int lms283gf05_remove(struct spi_device *spi)
-{
- struct lms283gf05_state *st = spi_get_drvdata(spi);
-
- lcd_device_unregister(st->ld);
-
- return 0;
-}
-
static struct spi_driver lms283gf05_driver = {
.driver = {
.name = "lms283gf05",
.owner = THIS_MODULE,
},
.probe = lms283gf05_probe,
- .remove = lms283gf05_remove,
};
module_spi_driver(lms283gf05_driver);