On Wed, 27 Sep 2006 16:38:41 -0400 (EDT)
Alan Stern <[EMAIL PROTECTED]> wrote:

> On Wed, 27 Sep 2006, Andrew Morton wrote:
> 
> > On Tue, 26 Sep 2006 14:46:16 -0400 (EDT)
> > Alan Stern <[EMAIL PROTECTED]> wrote:
> > 
> > > +         if (!autostopped) {
> > > +                 static int ohci_restart (struct ohci_hcd *ohci);
> > > +
> > > +                 spin_unlock_irq (&ohci->lock);
> > > +                 (void) ohci_init (ohci);
> > > +                 status = ohci_restart (ohci);
> > > +                 spin_lock_irq (&ohci->lock);
> > > +         }
> > 
> > drivers/usb/host/ohci-hub.c: In function 'ohci_rh_resume':
> > drivers/usb/host/ohci-hub.c:184: error: invalid storage class for function 
> > 'ohci_restart'                                                              
> >          
> > 
> > 
> > What on earth _is_ this crap?  Collateral damage from USB's bizarre
> > include-a-C-file-from-a-C-file thing?
> 
> No.  It's a sign that I'm using an older version of GCC than you are.  
> It compiles just fine on my system.  :-(
> 
> I moved the function declaration into the inner block in order to _avoid_
> a compiler warning!  When you build the driver with your
> "ohci-add-auto-stop-support-hack-hack" installed and CONFIG_PM not set,
> does your compiler complain about ohci_restart being declared `static' but
> never defined?  Mine does.

Yes, I'd expect so.  <sticks ifdefs around it...>

> Sigh...  This deserves to be cleaned up properly, but if you don't mind 
> I'll put it off for a little while.
> 
> BTW, we've had equivalent code in the USB core drivers for a long time.  
> >From drivers/usb/core/hub.c:
> 
>               if (udev->bus->b_hnp_enable || udev->bus->is_b_host) {
>                       static int __usb_port_suspend(struct usb_device *,
>                                               int port1);
>                       err = __usb_port_suspend(udev, udev->bus->otg_port);
>                       if (err < 0)
>                               dev_dbg(&udev->dev, "HNP fail, %d\n", err);
>               }
> 
> I assume that this hasn't bothered you because you never have
> CONFIG_USB_OTG set during a build, so the compiler never sees this code.

USB_OTG requires OMAP - I don't build arm much and perhaps my arm compiler
is OK with that declaration.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to