提交 a7e9e3ff 编写于 作者: J Jingoo Han 提交者: Linus Torvalds

backlight: ili922x: use devm_lcd_device_register()

Use devm_lcd_device_register() to make cleanup paths simpler.
Signed-off-by: NJingoo Han <jg1.han@samsung.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 ea5092c8
......@@ -513,8 +513,8 @@ static int ili922x_probe(struct spi_device *spi)
ili->power = FB_BLANK_POWERDOWN;
lcd = lcd_device_register("ili922xlcd", &spi->dev, ili,
&ili922x_ops);
lcd = devm_lcd_device_register(&spi->dev, "ili922xlcd", &spi->dev, ili,
&ili922x_ops);
if (IS_ERR(lcd)) {
dev_err(&spi->dev, "cannot register LCD\n");
return PTR_ERR(lcd);
......@@ -530,10 +530,7 @@ static int ili922x_probe(struct spi_device *spi)
static int ili922x_remove(struct spi_device *spi)
{
struct ili922x *ili = spi_get_drvdata(spi);
ili922x_poweroff(spi);
lcd_device_unregister(ili->ld);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册