Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964902Ab2B1PBc (ORCPT ); Tue, 28 Feb 2012 10:01:32 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:41155 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S964997Ab2B1PBa (ORCPT ); Tue, 28 Feb 2012 10:01:30 -0500 Date: Tue, 28 Feb 2012 10:01:29 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Arnd Bergmann cc: Wolfram Sang , , Roland Stigge , Greg Kroah-Hartman , , , Subject: Re: [PATCH v2] USB: Support for LPC32xx SoC In-Reply-To: <201202272201.14665.arnd@arndb.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1407 Lines: 33 On Mon, 27 Feb 2012, Arnd Bergmann wrote: > > The generic driver, as you'll see when you read the patch, includes > > generic versions of the various routines that a bus glue file has to > > provide (probe, remove, initialize, and so on). > > Ok, I see. Nevermind then, I don't think this will help to solve > the problem of building multiple ARM platforms together when they > provide conflicting bus glues, although it seems generally to be > a good idea in order to reduce the number of platform glues that there > are > > What do you think about an approach like below? It's heading in the intended direction, although the details might not all be quite right -- I didn't check them very closely. One big thing about it is wrong: Many or most of the functions you exported don't really need to be. Instead, ohci-hcd.c should define ohci_driver (a bus-agnostic hc_driver structure) and export that. Then the bus-glue files can copy the structure for their own use during initialization (rather than duplicating the definition all over the place) and override individual methods as needed. It's a more "object-oriented" approach. :-) Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/