diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-11-12 15:09:29 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-13 12:09:19 +0900 |
commit | 8358741ab72a6a15165d1a855304c81beee74240 (patch) | |
tree | bc08c792b10019a3cd7a6bebd15f3ef58367429d /drivers/video/backlight | |
parent | 0a1c55d0212661a582e9b4688410ccf9d4b163e8 (diff) | |
download | op-kernel-dev-8358741ab72a6a15165d1a855304c81beee74240.zip op-kernel-dev-8358741ab72a6a15165d1a855304c81beee74240.tar.gz |
backlight: lms501kf03: use devm_lcd_device_register()
Use devm_lcd_device_register() to make cleanup paths simpler.
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>
Diffstat (limited to 'drivers/video/backlight')
-rw-r--r-- | drivers/video/backlight/lms501kf03.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/video/backlight/lms501kf03.c b/drivers/video/backlight/lms501kf03.c index ff46e19..77258b7 100644 --- a/drivers/video/backlight/lms501kf03.c +++ b/drivers/video/backlight/lms501kf03.c @@ -350,8 +350,8 @@ static int lms501kf03_probe(struct spi_device *spi) return -EINVAL; } - ld = lcd_device_register("lms501kf03", &spi->dev, lcd, - &lms501kf03_lcd_ops); + ld = devm_lcd_device_register(&spi->dev, "lms501kf03", &spi->dev, lcd, + &lms501kf03_lcd_ops); if (IS_ERR(ld)) return PTR_ERR(ld); @@ -382,8 +382,6 @@ static int lms501kf03_remove(struct spi_device *spi) struct lms501kf03 *lcd = spi_get_drvdata(spi); lms501kf03_power(lcd, FB_BLANK_POWERDOWN); - lcd_device_unregister(lcd->ld); - return 0; } |