From: Jingoo Han Date: Tue, 12 Nov 2013 23:09:26 +0000 (-0800) Subject: backlight: ili922x: use devm_lcd_device_register() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a7e9e3ffd7e80db0d5eb181bc5b3054604db7811;p=openwrt%2Fstaging%2Fblogic.git backlight: ili922x: 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/ili922x.c b/drivers/video/backlight/ili922x.c index d9f65c2d9b01..73464e4b4c74 100644 --- a/drivers/video/backlight/ili922x.c +++ b/drivers/video/backlight/ili922x.c @@ -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; }