lkml.org 
[lkml]   [2011]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@free.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



\
 
 \ /
  Last update: 2011-07-02 22:37    [W:0.604 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site