Subject: + backlight-lp855x-use-devm_backlight_device_register.patch added to -mm tree To: jg1.han@xxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Tue, 24 Sep 2013 16:12:18 -0700 The patch titled Subject: backlight: lp855x: use devm_backlight_device_register() has been added to the -mm tree. Its filename is backlight-lp855x-use-devm_backlight_device_register.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/backlight-lp855x-use-devm_backlight_device_register.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/backlight-lp855x-use-devm_backlight_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 <jg1.han@xxxxxxxxxxx> Subject: backlight: lp855x: use devm_backlight_device_register() Use devm_backlight_device_register() to make cleanup paths simpler. Also, unnecessary lp855x_backlight_unregister() is removed. Signed-off-by: Jingoo Han <jg1.han@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/video/backlight/lp855x_bl.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff -puN drivers/video/backlight/lp855x_bl.c~backlight-lp855x-use-devm_backlight_device_register drivers/video/backlight/lp855x_bl.c --- a/drivers/video/backlight/lp855x_bl.c~backlight-lp855x-use-devm_backlight_device_register +++ a/drivers/video/backlight/lp855x_bl.c @@ -300,7 +300,7 @@ static int lp855x_backlight_register(str props.brightness = pdata->initial_brightness; - bl = backlight_device_register(name, lp->dev, lp, + bl = devm_backlight_device_register(lp->dev, name, lp->dev, lp, &lp855x_bl_ops, &props); if (IS_ERR(bl)) return PTR_ERR(bl); @@ -310,12 +310,6 @@ static int lp855x_backlight_register(str return 0; } -static void lp855x_backlight_unregister(struct lp855x *lp) -{ - if (lp->bl) - backlight_device_unregister(lp->bl); -} - static ssize_t lp855x_get_chip_id(struct device *dev, struct device_attribute *attr, char *buf) { @@ -439,29 +433,24 @@ static int lp855x_probe(struct i2c_clien ret = lp855x_configure(lp); if (ret) { dev_err(lp->dev, "device config err: %d", ret); - goto err_dev; + return ret; } ret = lp855x_backlight_register(lp); if (ret) { dev_err(lp->dev, "failed to register backlight. err: %d\n", ret); - goto err_dev; + return ret; } ret = sysfs_create_group(&lp->dev->kobj, &lp855x_attr_group); if (ret) { dev_err(lp->dev, "failed to register sysfs. err: %d\n", ret); - goto err_sysfs; + return ret; } backlight_update_status(lp->bl); return 0; - -err_sysfs: - lp855x_backlight_unregister(lp); -err_dev: - return ret; } static int lp855x_remove(struct i2c_client *cl) @@ -471,7 +460,6 @@ static int lp855x_remove(struct i2c_clie lp->bl->props.brightness = 0; backlight_update_status(lp->bl); sysfs_remove_group(&lp->dev->kobj, &lp855x_attr_group); - lp855x_backlight_unregister(lp); return 0; } _ Patches currently in -mm which might be from jg1.han@xxxxxxxxxxx are drivers-iommu-omap-iopgtableh-remove-unneeded-cast-of-void.patch backlight-lp855x_bl-support-new-lp8555-device.patch backlight-lm3630-apply-chip-revision.patch backlight-ld9040-staticize-local-variable-gamma_table.patch backlight-lm3639-dont-mix-different-enum-types.patch backlight-lp8788-staticize-default_bl_config.patch backlight-use-dev_get_platdata.patch backlight-88pm860x_bl-use-devm_backlight_device_register.patch backlight-aat2870-use-devm_backlight_device_register.patch backlight-adp5520-use-devm_backlight_device_register.patch backlight-adp8860-use-devm_backlight_device_register.patch backlight-adp8870-use-devm_backlight_device_register.patch backlight-as3711_bl-use-devm_backlight_device_register.patch backlight-atmel-pwm-bl-use-devm_backlight_device_register.patch backlight-bd6107-use-devm_backlight_device_register.patch backlight-da903x_bl-use-devm_backlight_device_register.patch backlight-da9052_bl-use-devm_backlight_device_register.patch backlight-ep93xx-use-devm_backlight_device_register.patch backlight-generic_bl-use-devm_backlight_device_register.patch backlight-gpio_backlight-use-devm_backlight_device_register.patch backlight-kb3886_bl-use-devm_backlight_device_register.patch backlight-lm3533_bl-use-devm_backlight_device_register.patch backlight-lp855x-use-devm_backlight_device_register.patch backlight-lv5207lp-use-devm_backlight_device_register.patch backlight-max8925_bl-use-devm_backlight_device_register.patch backlight-pandora_bl-use-devm_backlight_device_register.patch backlight-pcf50633-use-devm_backlight_device_register.patch backlight-tps65217_bl-use-devm_backlight_device_register.patch backlight-wm831x_bl-use-devm_backlight_device_register.patch backlight-hx8357-use-devm_lcd_device_register.patch backlight-ili922x-use-devm_lcd_device_register.patch backlight-ili9320-use-devm_lcd_device_register.patch backlight-lms283gf05-use-devm_lcd_device_register.patch backlight-lms501kf03-use-devm_lcd_device_register.patch backlight-ltv350qv-use-devm_lcd_device_register.patch backlight-platform_lcd-use-devm_lcd_device_register.patch backlight-tdo24m-use-devm_lcd_device_register.patch backlight-ams369fg06-use-devm_backlightlcd_device_register.patch backlight-ld9040-use-devm_backlightlcd_device_register.patch backlight-corgi_lcd-use-devm_backlightlcd_device_register.patch backlight-cr_bllcd-use-devm_backlightlcd_device_register.patch backlight-s6e63m0-use-devm_backlightlcd_device_register.patch drivers-rtc-rtc-ds1307c-release-irq-on-error.patch drivers-rtc-rtc-isl1208c-remove-redundant-checks.patch drivers-rtc-rtc-max6900c-remove-redundant-checks.patch drivers-rtc-rtc-vt8500c-fix-return-value.patch drivers-rtc-rtc-at91rm9200c-use-devm_-apis.patch drivers-rtc-rtc-isl1208c-use-devm_-apis.patch drivers-rtc-rtc-sirfsocc-use-devm_rtc_device_register.patch drivers-rtc-rtc-cmosc-remove-redundant-dev_set_drvdata.patch drivers-rtc-rtc-mrstc-remove-redundant-dev_set_drvdata.patch drivers-rtc-rtc-vr41xxc-fix-checkpatch-warnings.patch drivers-rtc-rtc-sirfsocc-remove-unneeded-casts-of-void.patch drivers-char-xilinx_hwicap-xilinx_hwicapc-remove-unneeded-cast-of-void.patch w1-w1-gpio-use-dev_get_platdata.patch w1-ds1wm-use-dev_get_platdata.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html