[PATCH 1/4] driver: allow register device with specific id

Sascha Hauer s.hauer at pengutronix.de
Fri Sep 17 09:54:14 EDT 2010


On Fri, Sep 17, 2010 at 03:50:37PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 15:45 Fri 17 Sep     , Sascha Hauer wrote:
> > Hi J,
> > 
> > On Sun, Sep 12, 2010 at 01:27:37PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > if you specify id = 0 the next available id will be taken
> > > otherwise fail if already registered
> > 
> > I think we need a better solution here. Being able to specify an id
> > is a good idea in general, but since 0 is a valid id we should be able
> > to specify exactly this id aswell.
> > An idea is to use -1 for a dynamic id, but of course this needs changes
> > to all existing devices.
> I prefer to do it a second step
> in this case

I prefer doing it first, because it makes sure the problem is getting
solved.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list