[PATCH v3 3/3] backlight: lm3630a: add firmware node support

Pavel Machek pavel at ucw.cz
Wed May 1 08:26:27 UTC 2019


Hi!

> > @@ -396,13 +506,20 @@ static int lm3630a_probe(struct i2c_client *client,
> >  				     GFP_KERNEL);
> >  		if (pdata == NULL)
> >  			return -ENOMEM;
> > +
> >  		/* default values */
> > -		pdata->leda_ctrl = LM3630A_LEDA_ENABLE;
> > -		pdata->ledb_ctrl = LM3630A_LEDB_ENABLE;
> > +		pdata->leda_ctrl = LM3630A_LEDA_DISABLE;
> > +		pdata->ledb_ctrl = LM3630A_LEDB_DISABLE;
> 
> This is not needed since default is disabled and kzalloc will set these to 0

Let compiler do this kind of optimalizations. Code makes sense as-is.

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20190501/97c41298/attachment.sig>


More information about the dri-devel mailing list