From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Christophe PLAGNIOL-VILLARD Date: Mon, 1 Sep 2008 21:50:26 +0200 Subject: [U-Boot] [PATCH 1/1] device: clone device on register In-Reply-To: <20080901181545.0d9eb7bd@hskinnemo-gx745.norway.atmel.com> References: <48BBD4AE.5040806@denx.de> <1220281886-15794-1-git-send-email-plagnioj@jcrosoft.com> <20080901174820.432871d2@hskinnemo-gx745.norway.atmel.com> <20080901181545.0d9eb7bd@hskinnemo-gx745.norway.atmel.com> Message-ID: <20080901195026.GA316@game.jcrosoft.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 18:15 Mon 01 Sep , Haavard Skinnemoen wrote: > Haavard Skinnemoen wrote: > > Jean-Christophe PLAGNIOL-VILLARD wrote: > > > to prevent that the pointer will not be use for an other register > > > > > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD > > > > 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. I've plan to cleanup this part during next release. and redesign console management to simplify it and reduce its code. I'm currently designing a generic bus/device/driver mecanism that will simplify the implementation without increase the size. I'll send a announce about it Best Regards, J.