Skip to contentSkip to conversation

+ backlight-l4f00242t03-use-devm_lcd_device_register.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Dec 3, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Subject: + backlight-l4f00242t03-use-devm_lcd_device_register.patch added to -mm tree
To: [email protected],[email protected]
From: [email protected]
Date: Mon, 02 Dec 2013 17:00:37 -0800

The patch titled

     Subject: backlight: l4f00242t03: use devm_lcd_device_register()
has been added to the -mm tree.  Its filename is
     backlight-l4f00242t03-use-devm_lcd_device_register.patch

This patch should soon appear at

    http://ozlabs.org/~akpm/mmots/broken-out/backlight-l4f00242t03-use-devm_lcd_device_register.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/backlight-l4f00242t03-use-devm_lcd_device_register.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Jingoo Han <[email protected]>
Subject: backlight: l4f00242t03: use devm_lcd_device_register()

Use devm_lcd_device_register() to make cleanup paths simpler.

---

 drivers/video/backlight/l4f00242t03.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/video/backlight/l4f00242t03.c renamed from drivers/video/backlight/l4f00242t03.c~backlight-l4f00242t03-use-devm_lcd_device_register +2 -3
diff -puN drivers/video/backlight/l4f00242t03.c~backlight-l4f00242t03-use-devm_lcd_device_register drivers/video/backlight/l4f00242t03.c
@@ -223,8 +223,8 @@ static int l4f00242t03_probe(struct spi_
 		return PTR_ERR(priv->core_reg);
 	}
 
-	priv->ld = lcd_device_register("l4f00242t03",
-					&spi->dev, priv, &l4f_ops);
+	priv->ld = devm_lcd_device_register(&spi->dev, "l4f00242t03", &spi->dev,
+					priv, &l4f_ops);
 	if (IS_ERR(priv->ld))
 		return PTR_ERR(priv->ld);
 
@@ -243,8 +243,6 @@ static int l4f00242t03_remove(struct spi
 	struct l4f00242t03_priv *priv = spi_get_drvdata(spi);
 
 	l4f00242t03_lcd_power_set(priv->ld, FB_BLANK_POWERDOWN);
-	lcd_device_unregister(priv->ld);