On Wed, Jan 20, 2021 at 06:16:28PM +0200, Baruch Siach wrote: > Hardware appears to treat zero value as 2^32. Take advantage of this > fact to support on/off values of up to UINT_MAX+1 == 2^32. Adjust both > .apply and .get_state to handle zero as a special case. > > Rounded up division result in .get_state can't be zero, since the > dividend is now larger than 0. Remove check for this case. > > Reported-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> > Analyzed-by: Russell King <linux@xxxxxxxxxxxxxxx> > Signed-off-by: Baruch Siach <baruch@xxxxxxxxxx> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> Thanks Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |
Attachment:
signature.asc
Description: PGP signature