turris-omnia: fixes needed was Re: We have multicolor, but should we turn it into RGB?

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

 



Hi!

> > +++ b/drivers/leds/leds-turris-omnia.c
> > @@ -94,15 +94,15 @@ static int omnia_led_register(struct i2c_client
> > *client, struct omnia_led *led, dev_warn(dev,
> >  			 "Node %pOF: must contain 'reg' property
> > with values between 0 and %i\n", np, OMNIA_BOARD_LEDS - 1);
> > -		return 0;
> > +		return 0; /* FIXME: should return 0/errrno */
> >  	}
> >  
> >  	ret = of_property_read_u32(np, "color", &color);
> > -	if (ret || color != LED_COLOR_ID_MULTI) {
> > +	if (ret || color != LED_COLOR_ID_RGB) {
> >  		dev_warn(dev,
> > -			 "Node %pOF: must contain 'color' property
> > with value LED_COLOR_ID_MULTI\n",
> > +			 "Node %pOF: must contain 'color' property
> > with value LED_COLOR_ID_RGB\n", np);
> > -		return 0;
> > +		return 0; /* FIXME: should return 0/errrno */
> >  	}
> >  
> >  	led->subled_info[0].color_index = LED_COLOR_ID_RED;
> > @@ -145,7 +145,7 @@ static int omnia_led_register(struct i2c_client
> > *client, struct omnia_led *led, return ret;
> >  	}
> >  
> > -	return 1;
> > +	return 1; /* FIXME: should return 0/errrno */
> >  }
> >  
> >  /*

> Yes, if you want to have RGB as a special case of multicolor so that in
> the future we can work on color curves or something, this could work

Ok, let's do that.

Could you review return value of omnia_led_register() [see the patch
above]? AFAICT it is buggy.

I'd like to push the driver to Linus in few days...

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux