The patch titled Subject: backlight/lp855x_bl.c: small cleanups has been added to the -mm tree. Its filename is backlight-lp855x_blc-small-cleanups.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: Axel Lin <axel.lin@xxxxxxxxx> Subject: backlight/lp855x_bl.c: small cleanups - Make lp855x_bl_update_status() return 0 instead of bl->props.brightness. It looks pointless to return bl->props.brightness for lp855x_bl_update_status. Make it return 0 on success. - Use devm_kzalloc to save a few error handling code. - Use module_i2c_driver Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx> Cc: Richard Purdie <rpurdie@xxxxxxxxx> Cc: "Milo(Woogyom) Kim" <milo.kim@xxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/video/backlight/lp855x_bl.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff -puN drivers/video/backlight/lp855x_bl.c~backlight-lp855x_blc-small-cleanups drivers/video/backlight/lp855x_bl.c --- a/drivers/video/backlight/lp855x_bl.c~backlight-lp855x_blc-small-cleanups +++ a/drivers/video/backlight/lp855x_bl.c @@ -132,7 +132,7 @@ static int lp855x_bl_update_status(struc lp855x_write_byte(lp, BRIGHTNESS_CTRL, val); } - return bl->props.brightness; + return 0; } static int lp855x_bl_get_brightness(struct backlight_device *bl) @@ -242,7 +242,7 @@ static int lp855x_probe(struct i2c_clien if (!i2c_check_functionality(cl->adapter, I2C_FUNC_SMBUS_I2C_BLOCK)) return -EIO; - lp = kzalloc(sizeof(struct lp855x), GFP_KERNEL); + lp = devm_kzalloc(&cl->dev, sizeof(struct lp855x), GFP_KERNEL); if (!lp) return -ENOMEM; @@ -276,14 +276,11 @@ static int lp855x_probe(struct i2c_clien } backlight_update_status(lp->bl); - return ret; + return 0; -err_dev: - kfree(lp); - return ret; err_sysfs: lp855x_backlight_unregister(lp); - kfree(lp); +err_dev: return ret; } @@ -295,7 +292,6 @@ static int __devexit lp855x_remove(struc backlight_update_status(lp->bl); sysfs_remove_group(&lp->dev->kobj, &lp855x_attr_group); lp855x_backlight_unregister(lp); - kfree(lp); return 0; } @@ -319,18 +315,7 @@ static struct i2c_driver lp855x_driver = .id_table = lp855x_ids, }; -static int __init lp855x_init(void) -{ - return i2c_add_driver(&lp855x_driver); -} - -static void __exit lp855x_exit(void) -{ - i2c_del_driver(&lp855x_driver); -} - -module_init(lp855x_init); -module_exit(lp855x_exit); +module_i2c_driver(lp855x_driver); MODULE_DESCRIPTION("Texas Instruments LP855x Backlight driver"); MODULE_AUTHOR("Milo Kim <milo.kim@xxxxxx>"); _ Subject: Subject: backlight/lp855x_bl.c: small cleanups Patches currently in -mm which might be from axel.lin@xxxxxxxxx are linux-next.patch platform-drivers-x86-convert-drivers-platform-x86-to-use-module_platform_driver.patch backlight-convert-backlight-i2c-drivers-to-module_i2c_driver.patch backlight-convert-backlight-spi-drivers-to-module_spi_driver.patch backlight-new-backlight-driver-for-lp855x-devices-fix.patch backlight-lp855x_blc-check-platform-data-in-lp855x_probe.patch backlight-lp855x_blc-small-cleanups.patch rtc-convert-rtc-spi-drivers-to-module_spi_driver.patch rtc-convert-rtc-i2c-drivers-to-module_i2c_driver.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