Re: [PATCH 2/2] pwm: ensure pwm_apply_state() doesn't modify the state argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 12, 2019 at 09:35:37AM +0100, Uwe Kleine-König wrote:
[...]
> diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c
> index 470d4f71e7eb..52dace9f739e 100644
> --- a/drivers/pwm/pwm-sun4i.c
> +++ b/drivers/pwm/pwm-sun4i.c
[...]
> @@ -193,17 +193,11 @@ static int sun4i_pwm_calculate(struct sun4i_pwm_chip *sun4i_pwm,
>  	*dty = div;
>  	*prsclr = prescaler;
>  
> -	div = (u64)pval * NSEC_PER_SEC * *prd;
> -	state->period = DIV_ROUND_CLOSEST_ULL(div, clk_rate);
> -
> -	div = (u64)pval * NSEC_PER_SEC * *dty;
> -	state->duty_cycle = DIV_ROUND_CLOSEST_ULL(div, clk_rate);
> -

Perhaps split this out into a separate patch like you did for Rockchip?

Thierry

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-rockchip

[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux