On Wed, 13 Nov 2013, David Laight wrote:

> > From: Oliver Neukum <[email protected]>
> > 
> > Just remove the conditional compilation.
> > 
> > Signed-off-by: Oliver Neukum <[email protected]>
> > ---
> >  drivers/usb/host/ohci-hcd.c | 6 ------
> >  1 file changed, 6 deletions(-)
> > 
> > diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
> > index 501ecea..de0e3e4 100644
> > --- a/drivers/usb/host/ohci-hcd.c
> > +++ b/drivers/usb/host/ohci-hcd.c
> > @@ -1225,13 +1225,11 @@ static int __init ohci_hcd_mod_init(void)
> >             sizeof (struct ed), sizeof (struct td));
> >     set_bit(USB_OHCI_LOADED, &usb_hcds_loaded);
> > 
> > -#ifdef DEBUG
> >     ohci_debug_root = debugfs_create_dir("ohci", usb_debug_root);
> >     if (!ohci_debug_root) {
> >             retval = -ENOENT;
> >             goto error_debug;
> >     }
> > -#endif
> 
> If the above fails, wouldn't it be better to carry on but without
> creating the dubugfs nodes (etc).
> 
> There might be some systems where the 'bloat' of debugfs isn't wanted.

If debugfs isn't configured in the kernel then debugfs_create_dir() 
always returns ERR_PTR(-ENODEV).  Hence the code above will succeed, 
and the driver _will_ carry on.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to