The patch titled Subject: backlight: lp855x_bl: simplify bl_get_brightness() has been added to the -mm tree. Its filename is backlight-lp855x_bl-simplify-bl_get_brightness.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: "Kim, Milo" <Milo.Kim@xxxxxx> Subject: backlight: lp855x_bl: simplify bl_get_brightness() Getting the brightness value is not critical, no need to read the actual register value. To simplify it, just return the 'bl->props.brightness' value. Then, lp855x_read_byte() can be removed, not used any more. Signed-off-by: Milo(Woogyom) Kim <milo.kim@xxxxxx> Acked-by: Jingoo Han <jg1.han@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/video/backlight/lp855x_bl.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff -puN drivers/video/backlight/lp855x_bl.c~backlight-lp855x_bl-simplify-bl_get_brightness drivers/video/backlight/lp855x_bl.c --- a/drivers/video/backlight/lp855x_bl.c~backlight-lp855x_bl-simplify-bl_get_brightness +++ a/drivers/video/backlight/lp855x_bl.c @@ -66,20 +66,6 @@ struct lp855x { struct pwm_device *pwm; }; -static int lp855x_read_byte(struct lp855x *lp, u8 reg, u8 *data) -{ - int ret; - - ret = i2c_smbus_read_byte_data(lp->client, reg); - if (ret < 0) { - dev_err(lp->dev, "failed to read 0x%.2x\n", reg); - return ret; - } - - *data = (u8)ret; - return 0; -} - static int lp855x_write_byte(struct lp855x *lp, u8 reg, u8 data) { return i2c_smbus_write_byte_data(lp->client, reg, data); @@ -274,16 +260,6 @@ static int lp855x_bl_update_status(struc static int lp855x_bl_get_brightness(struct backlight_device *bl) { - struct lp855x *lp = bl_get_data(bl); - enum lp855x_brightness_ctrl_mode mode = lp->pdata->mode; - - if (mode == REGISTER_BASED) { - u8 val = 0; - - lp855x_read_byte(lp, lp->cfg->reg_brightness, &val); - bl->props.brightness = val; - } - return bl->props.brightness; } _ Patches currently in -mm which might be from Milo.Kim@xxxxxx are origin.patch linux-next.patch backlight-add-new-lp8788-backlight-driver.patch backlight-add-new-lp8788-backlight-driver-checkpatch-fixes.patch backlight-lp855x_bl-introduce-device-configuration-flow.patch backlight-lp855x_bl-support-new-lp8557-device.patch backlight-lp855x_bl-simplify-bl_get_brightness.patch rtc-add-new-lp8788-rtc-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