@@ -57,8 +57,6 @@
#define ISINK_CH_EN(i) BIT(i)
#define MAX_SUPPORTED_LEDS 8
-#define MT6323_CAL_HW_DUTY(o, p, u) DIV_ROUND_CLOSEST((o) * 100000ul,\
- (p) * (u))
struct mt6323_leds;
@@ -316,7 +314,7 @@ static int mt6323_led_set_blink(struct led_classdev *cdev,
* Calculate duty_hw based on the percentage of period during
* which the led is ON.
*/
- duty_hw = MT6323_CAL_HW_DUTY(*delay_on, period, spec->unit_duty);
+ duty_hw = DIV_ROUND_CLOSEST(*delay_on * 100000ul, period * spec->unit_duty);
/* hardware doesn't support zero duty cycle. */
if (!duty_hw)