lkml.org 
[lkml]   [2016]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v6] platform:x86: Add PMC Driver for Intel Core SoC
From
On Wed, May 25, 2016 at 11:13 PM, Darren Hart <dvhart@infradead.org> wrote:
> On Wed, May 25, 2016 at 11:14:52PM +0530, Rajneesh Bhardwaj wrote:

> Hi Rajneesh,
>
> Unfortunately during my build test, this introduced a new warning to the build:
>
> drivers/platform/x86/intel_pmc_core.c:201:19: warning: ‘intel_pmc_core_init’
> defined but not used [-Wunused-function]
> static int __init intel_pmc_core_init(void)
>
> After the removal of the module stuff, the driver needed a device_initcall, or
> the macro equivalent, consider:
>
> $ git diff
> diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
> index c834281..f6a29b9 100644
> --- a/drivers/platform/x86/intel_pmc_core.c
> +++ b/drivers/platform/x86/intel_pmc_core.c
> @@ -198,7 +198,4 @@ static struct pci_driver intel_pmc_core_driver = {

> .remove = NULL, /* not a hot-plug capable driver */

Since it requires an update I would suggest to remove above line completely.

> };
>
> -static int __init intel_pmc_core_init(void)
> -{
> - return pci_register_driver(&intel_pmc_core_driver);
> -}
> +builtin_pci_driver(intel_pmc_core_driver);

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2016-05-25 23:21    [W:2.058 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site