Re: [PATCH 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

From: Daniel Thompson
Date: Fri Jan 12 2018 - 06:51:03 EST


On Fri, Jan 12, 2018 at 11:14:54AM +0100, Enric Balletbo Serra wrote:
> > @@ -441,6 +544,26 @@ static int pwm_backlight_probe(struct platform_device *pdev)
> >
> > dev_dbg(&pdev->dev, "got pwm for backlight\n");
> >
> > + if (!data->levels) {
> > + /* Get the PWM period (in nanoseconds) */
> > + pwm_get_state(pb->pwm, &state);
> > +
> > + ret = pwm_backlight_brightness_default(&pdev->dev, data,
> > + state.period);
> > + if (ret < 0) {
> > + dev_err(&pdev->dev,
> > + "failed to setup default brightness table\n");
> > + goto err_alloc;
> > + }
> > + }
> > +
> > + for (i = 0; i <= data->max_brightness; i++)
>
> Oops, horrible and unjustifiable mistake, missing { here :/

Well, at least you found it rather than us :-)


Daniel.