[U-Boot] [PATCH 1/1] device: clone device on register

Haavard Skinnemoen haavard.skinnemoen at atmel.com
Mon Sep 1 18:15:45 CEST 2008


Haavard Skinnemoen <haavard.skinnemoen at atmel.com> wrote:
> Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com> wrote:
> > to prevent that the pointer will not be use for an other register
> > 
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>  
> 
> Er. What? If a device is registered multiple times, that sounds like
> something which should be fixed, not papered over like this...

I take that back. I didn't realize how much of a f***ing trainwreck the
device system is...apparently the callers expect device_register() to
clone the device, but this fact was hidden well within the old list
implementation. Your patches makes this much more apparent, which is
obviously good.

Oh, and your patch fixes the breakage I was seeing on avr32. Thanks.

Haavard


More information about the U-Boot mailing list