lkml.org 
[lkml]   [2013]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [char-misc-next 05/11] mei: bus: Call bus routines from the core code
Date


> -----Original Message-----
> From: Arnd Bergmann [mailto:arnd@arndb.de]
> Sent: Friday, February 08, 2013 00:38
> To: Winkler, Tomas
> Cc: gregkh@linuxfoundation.org; sameo@linux.intel.com; linux-
> kernel@vger.kernel.org
> Subject: Re: [char-misc-next 05/11] mei: bus: Call bus routines from the core
> code
>
> On Thursday 07 February 2013, Tomas Winkler wrote:
> > @@ -197,6 +197,9 @@ static int mei_probe(struct pci_dev *pdev, const
> struct pci_device_id *ent)
> > mei_pdev = pdev;
> > pci_set_drvdata(pdev, dev);
> >
> > + err = mei_bus_init(mei_pdev);
> > + if (err)
> > + goto deregister_mei;
> >
> > schedule_delayed_work(&dev->timer_work, HZ);
> >
>
> This is fairly unusual, and will break if you ever have multiple mei devices in
> one system, because you end up registering the bus type for each device. I
> think it would be more logical to register/unregister the bus_type from the
> module_init/exit functions of the module that contains the bus_type object.

MEI is a singleton and it is enforced also in software in the probe

Second why to register anything if the MEI device is not present on the system.

Thanks
Tomas



\
 
 \ /
  Last update: 2013-02-08 00:42    [W:0.696 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site