[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1107021633160.16190-100000@netrider.rowland.org>
Date: Sat, 2 Jul 2011 16:35:15 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Matthieu CASTET <castet.matthieu@...e.fr>
cc: Linux Kernel list <linux-kernel@...r.kernel.org>,
<linux-usb@...r.kernel.org>
Subject: Re: [PATCH 1/2] EHCI : introduce a common ehci_setup
On Sat, 2 Jul 2011, Matthieu CASTET wrote:
> This allow to clean duplicated code in most of SOC driver.
>
> Signed-off-by: Matthieu CASTET <castet.matthieu@...e.fr>
> ---
> drivers/usb/host/ehci-hcd.c | 29 +++++++++++++++++++++++++++++
> 1 files changed, 29 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
> index f8030ee..f990b0f 100644
> --- a/drivers/usb/host/ehci-hcd.c
> +++ b/drivers/usb/host/ehci-hcd.c
> @@ -763,6 +763,35 @@ static int ehci_run (struct usb_hcd *hcd)
> return 0;
> }
>
> +static int __maybe_unused ehci_setup (struct usb_hcd *hcd)
> +{
> + struct ehci_hcd *ehci = hcd_to_ehci(hcd);
> + int retval;
...
> +}
> +
Instead of putting this routine in ehci-hcd.c, where it will silently
use up unnecessary codespace on thousands or millions of desktop
systems, why not put it into a new separate source file? Then the SOC
drivers can #include that file.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists