Skip to content

Commit

Permalink
media: ir-rx51: Use 64-bit division macro
Browse files Browse the repository at this point in the history
Since the PWM framework is switching struct pwm_state.period's datatype
to u64, prepare for this transition by using DIV_ROUND_CLOSEST_ULL to
handle a 64-bit dividend.

Cc: Richard Fontana <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Kate Stewart <[email protected]>
Cc: Allison Randal <[email protected]>
Signed-off-by: Guru Das Srinagesh <[email protected]>
Signed-off-by: Sean Young <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
Guru Das Srinagesh authored and mchehab committed Apr 21, 2020
1 parent c77591a commit 9448762
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/rc/ir-rx51.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static int ir_rx51_probe(struct platform_device *dev)
}

/* Use default, in case userspace does not set the carrier */
ir_rx51.freq = DIV_ROUND_CLOSEST(pwm_get_period(pwm), NSEC_PER_SEC);
ir_rx51.freq = DIV_ROUND_CLOSEST_ULL(pwm_get_period(pwm), NSEC_PER_SEC);
pwm_put(pwm);

hrtimer_init(&ir_rx51.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
Expand Down

0 comments on commit 9448762

Please sign in to comment.