From: Jingoo Han Date: Tue, 12 Nov 2013 23:09:29 +0000 (-0800) Subject: backlight: lms501kf03: use devm_lcd_device_register() X-Git-Tag: v3.13-rc1~106^2~123 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8358741ab72a6a15165d1a855304c81beee74240;p=profile%2Fivi%2Fkernel-x86-ivi.git backlight: lms501kf03: use devm_lcd_device_register() Use devm_lcd_device_register() to make cleanup paths simpler. Signed-off-by: Jingoo Han Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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; }