Skip to content

Commit

Permalink
Merge "leds: qpnp-flash-v2: Modify current code calculation"
Browse files Browse the repository at this point in the history
  • Loading branch information
Linux Build Service Account authored and Gerrit - the friendly Code Review server committed May 2, 2018
2 parents bf8090c + a228cb4 commit cb0e8e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/leds/leds-qpnp-flash-v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ static inline int get_current_reg_code(int target_curr_ma, int ires_ua)
if (!ires_ua || !target_curr_ma || (target_curr_ma < (ires_ua / 1000)))
return 0;

return DIV_ROUND_UP(target_curr_ma * 1000, ires_ua) - 1;
return DIV_ROUND_CLOSEST(target_curr_ma * 1000, ires_ua) - 1;
}

static int qpnp_flash_led_read(struct qpnp_flash_led *led, u16 addr, u8 *data)
Expand Down

0 comments on commit cb0e8e7

Please sign in to comment.