From: Jingoo Han Date: Tue, 12 Nov 2013 23:09:28 +0000 (-0800) Subject: backlight: lms283gf05: use devm_lcd_device_register() X-Git-Tag: accepted/tizen/common/20141203.182822~1142^2~124 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a1c55d0212661a582e9b4688410ccf9d4b163e8;p=platform%2Fkernel%2Flinux-arm64.git 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/backlight/lms283gf05.c b/drivers/video/backlight/lms283gf05.c index 80b5929..de88325 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);