Commit 8358741a authored by Jingoo Han's avatar Jingoo Han Committed by Linus Torvalds

backlight: lms501kf03: use devm_lcd_device_register()

Use devm_lcd_device_register() to make cleanup paths simpler.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0a1c55d0
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment