diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-11-12 18:09:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-12 22:09:19 -0500 |
commit | a7e9e3ffd7e80db0d5eb181bc5b3054604db7811 (patch) | |
tree | d8df7b18af676bce5d1b1bbc4f9f044d4f3e7219 | |
parent | ea5092c890ed093297554e0216188543ee445068 (diff) |
backlight: ili922x: 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>
-rw-r--r-- | drivers/video/backlight/ili922x.c | 7 |
1 files changed, 2 insertions, 5 deletions
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) | |||
513 | 513 | ||
514 | ili->power = FB_BLANK_POWERDOWN; | 514 | ili->power = FB_BLANK_POWERDOWN; |
515 | 515 | ||
516 | lcd = lcd_device_register("ili922xlcd", &spi->dev, ili, | 516 | lcd = devm_lcd_device_register(&spi->dev, "ili922xlcd", &spi->dev, ili, |
517 | &ili922x_ops); | 517 | &ili922x_ops); |
518 | if (IS_ERR(lcd)) { | 518 | if (IS_ERR(lcd)) { |
519 | dev_err(&spi->dev, "cannot register LCD\n"); | 519 | dev_err(&spi->dev, "cannot register LCD\n"); |
520 | return PTR_ERR(lcd); | 520 | return PTR_ERR(lcd); |
@@ -530,10 +530,7 @@ static int ili922x_probe(struct spi_device *spi) | |||
530 | 530 | ||
531 | static int ili922x_remove(struct spi_device *spi) | 531 | static int ili922x_remove(struct spi_device *spi) |
532 | { | 532 | { |
533 | struct ili922x *ili = spi_get_drvdata(spi); | ||
534 | |||
535 | ili922x_poweroff(spi); | 533 | ili922x_poweroff(spi); |
536 | lcd_device_unregister(ili->ld); | ||
537 | return 0; | 534 | return 0; |
538 | } | 535 | } |
539 | 536 | ||