lkml.org 
[lkml]   [2020]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/2] USB: misc: Add onboard_usb_hub driver
On Mon, Sep 21, 2020 at 06:18:37PM -0700, Matthias Kaehlcke wrote:
> On Sun, Sep 20, 2020 at 04:17:20PM +0200, Greg Kroah-Hartman wrote:
> > On Thu, Sep 17, 2020 at 11:46:22AM -0700, Matthias Kaehlcke wrote:
> > >
> > > ...
> > >
> > > +static int __init onboard_hub_init(void)
> > > +{
> > > + int rc;
> > > +
> > > + rc = platform_driver_register(&onboard_hub_driver);
> > > + if (rc)
> > > + return rc;
> > > +
> > > + return usb_register_device_driver(&onboard_hub_usbdev_driver, THIS_MODULE);
> >
> > No unwinding of the platform driver register if this fails?
>
> Right, will add unwinding.
>
> > And THIS_MODULE should not be needed, did we get the api wrong here?
>
> It seems you suggest to use usb_register() instead, SGTM

Actually usb_register() is for registering a struct usb_driver, however
this is a struct usb_device_driver, there doesn't seem to be a
registration function/macro that doesn't require THIS_MODULE. Please
provide a pointer if I'm wrong.

\
 
 \ /
  Last update: 2020-09-24 00:26    [W:0.167 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site