On Tue, Oct 13, 2026 at 09:09:31PM +0300, Svyatoslav Ryhel wrote:
> @@ -69,10 +57,11 @@ static int aat2870_bl_update_status(struct
> backlight_device *bd)
> dev_dbg(&bd->dev, "brightness=%d, power=%d, state=%d\n",
> bd->props.brightness, bd->props.power, bd->props.state);
>
> - ret = aat2870->write(aat2870, AAT2870_BLM,
> - (u8)aat2870_brightness(aat2870_bl, brightness));
> - if (ret < 0)
> - return ret;
> + if (brightness) {
> + ret = aat2870->write(aat2870, AAT2870_BLM, (u8)brightness - 1);
> + if (ret < 0)
> + return ret;
> + }
>
> if (brightness == 0) {
I think this could be spelled "else" ;-)
However, other than this this looks good. With that change applied:
Reviewed-by: Daniel Thompson (RISCstar) <[email protected]>
Daniel