Re: [char-misc-next 05/11] mei: bus: Call bus routines from the core code

2013-02-07 Thread Arnd Bergmann
On Thursday 07 February 2013, Winkler, Tomas wrote: > Second why to register anything if the MEI device is not present on the > system. Mostly to match the expectations of readers of that code. Note that no memory is wasted if you do this, because it's a static data structure. You can actually

Re: [char-misc-next 05/11] mei: bus: Call bus routines from the core code

2013-02-07 Thread Samuel Ortiz
Hi Arnd, On Thu, Feb 07, 2013 at 10:37:30PM +, Arnd Bergmann wrote: > 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,

RE: [char-misc-next 05/11] mei: bus: Call bus routines from the core code

2013-02-07 Thread Winkler, Tomas
> -Original Message- > From: Arnd Bergmann [mailto:a...@arndb.de] > Sent: Friday, February 08, 2013 00:38 > To: Winkler, Tomas > Cc: gre...@linuxfoundation.org; sa...@linux.intel.com; linux- > ker...@vger.kernel.org > Subject: Re: [char-misc-next 05/11] mei: bus: C

Re: [char-misc-next 05/11] mei: bus: Call bus routines from the core code

2013-02-07 Thread Arnd Bergmann
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) > +

[char-misc-next 05/11] mei: bus: Call bus routines from the core code

2013-02-07 Thread Tomas Winkler
From: Samuel Ortiz Register the MEI bus type against the kernel core bus APIs and call the bus Rx handler from interrupt.c Signed-off-by: Samuel Ortiz Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 22 ++ drivers/misc/mei/interrupt.c |2 ++

[char-misc-next 05/11] mei: bus: Call bus routines from the core code

2013-02-07 Thread Tomas Winkler
From: Samuel Ortiz sa...@linux.intel.com Register the MEI bus type against the kernel core bus APIs and call the bus Rx handler from interrupt.c Signed-off-by: Samuel Ortiz sa...@linux.intel.com Signed-off-by: Tomas Winkler tomas.wink...@intel.com --- drivers/misc/mei/bus.c | 22

Re: [char-misc-next 05/11] mei: bus: Call bus routines from the core code

2013-02-07 Thread Arnd Bergmann
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

RE: [char-misc-next 05/11] mei: bus: Call bus routines from the core code

2013-02-07 Thread Winkler, Tomas
-Original Message- From: Arnd Bergmann [mailto:a...@arndb.de] Sent: Friday, February 08, 2013 00:38 To: Winkler, Tomas Cc: gre...@linuxfoundation.org; sa...@linux.intel.com; linux- ker...@vger.kernel.org Subject: Re: [char-misc-next 05/11] mei: bus: Call bus routines from the core

Re: [char-misc-next 05/11] mei: bus: Call bus routines from the core code

2013-02-07 Thread Samuel Ortiz
Hi Arnd, On Thu, Feb 07, 2013 at 10:37:30PM +, Arnd Bergmann wrote: 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); +

Re: [char-misc-next 05/11] mei: bus: Call bus routines from the core code

2013-02-07 Thread Arnd Bergmann
On Thursday 07 February 2013, Winkler, Tomas wrote: Second why to register anything if the MEI device is not present on the system. Mostly to match the expectations of readers of that code. Note that no memory is wasted if you do this, because it's a static data structure. You can actually