Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1436717 > unrolled thread

[PATCH 3/6] mfd: intel_msic: Make it explicitly non-modular

Started byPaul Gortmaker <paul.gortmaker@windriver.com>
First post2016-07-05 03:30 +0200
Last post2016-07-07 12:40 +0200
Articles 6 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/6] mfd: intel_msic: Make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-07-05 03:30 +0200
    Re: [PATCH 3/6] mfd: intel_msic: Make it explicitly non-modular Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-07-05 12:10 +0200
      Re: [PATCH 3/6] mfd: intel_msic: Make it explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-07-06 18:40 +0200
        Re: [PATCH 3/6] mfd: intel_msic: Make it explicitly non-modular Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-07-07 10:20 +0200
          Re: [PATCH 3/6] mfd: intel_msic: Make it explicitly non-modular Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-07-07 12:30 +0200
            Re: [PATCH 3/6] mfd: intel_msic: Make it explicitly non-modular Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-07-07 12:40 +0200

#1436717 — [PATCH 3/6] mfd: intel_msic: Make it explicitly non-modular

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2016-07-05 03:30 +0200
Subject[PATCH 3/6] mfd: intel_msic: Make it explicitly non-modular
Message-ID<rRnlw-4AT-19@gated-at.bofh.it>
The Kconfig currently controlling compilation of this code is:

drivers/mfd/Kconfig:config MFD_INTEL_MSIC
drivers/mfd/Kconfig:    bool "Intel MSIC"

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple instances of module references, so that
when reading the driver there is no doubt it is builtin-only.

Since module_platform_driver() uses the same init level priority as
builtin_platform_driver() the init ordering remains unchanged with
this commit.

We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

Cc: Lee Jones <lee.jones@linaro.org>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/mfd/intel_msic.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/mfd/intel_msic.c b/drivers/mfd/intel_msic.c
index 25d486c543cb..2017446c5b4b 100644
--- a/drivers/mfd/intel_msic.c
+++ b/drivers/mfd/intel_msic.c
@@ -12,7 +12,7 @@
 #include <linux/err.h>
 #include <linux/gpio.h>
 #include <linux/io.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/mfd/core.h>
 #include <linux/mfd/intel_msic.h>
 #include <linux/platform_device.h>
@@ -449,9 +449,4 @@ static struct platform_driver intel_msic_driver = {
 		.name	= "intel_msic",
 	},
 };
-
-module_platform_driver(intel_msic_driver);
-
-MODULE_DESCRIPTION("Driver for Intel MSIC");
-MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>");
-MODULE_LICENSE("GPL");
+builtin_platform_driver(intel_msic_driver);
-- 
2.8.4

[toc] | [next] | [standalone]


#1436880

FromMika Westerberg <mika.westerberg@linux.intel.com>
Date2016-07-05 12:10 +0200
Message-ID<rRvsJ-1qm-3@gated-at.bofh.it>
In reply to#1436717
On Mon, Jul 04, 2016 at 09:25:41PM -0400, Paul Gortmaker wrote:
> The Kconfig currently controlling compilation of this code is:
> 
> drivers/mfd/Kconfig:config MFD_INTEL_MSIC
> drivers/mfd/Kconfig:    bool "Intel MSIC"

I would prefer if it could be turned to tristate instead. I don't see
any reasons why it should only be builtin.

[toc] | [prev] | [next] | [standalone]


#1437839

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2016-07-06 18:40 +0200
Message-ID<rRY1I-369-25@gated-at.bofh.it>
In reply to#1436880
[Re: [PATCH 3/6] mfd: intel_msic: Make it explicitly non-modular] On 05/07/2016 (Tue 13:08) Mika Westerberg wrote:

> On Mon, Jul 04, 2016 at 09:25:41PM -0400, Paul Gortmaker wrote:
> > The Kconfig currently controlling compilation of this code is:
> > 
> > drivers/mfd/Kconfig:config MFD_INTEL_MSIC
> > drivers/mfd/Kconfig:    bool "Intel MSIC"
> 
> I would prefer if it could be turned to tristate instead. I don't see
> any reasons why it should only be builtin.

If I change it to tristate, it is still impossible to choose =m for it
unless I revert your earlier commit forcing it to be built in.

commit 15a713df4145ad2540f8d84c3f4de930806f6151
Author: Mika Westerberg <mika.westerberg@linux.intel.com>
Date:   Thu Jan 26 17:35:05 2012 +0000

    x86/config: Select MSIC MFD driver on Intel Medfield platform
    
    On Intel Medfield platform we use MSIC MFD driver to create
    necessary platform devices so it is essential to have the driver
    compiled into the kernel.

If I revert that, then it is possible to choose =m and it compiles.
(haven't completed modpost yet.. so may be missing symbols...)

Paul.
--

[toc] | [prev] | [next] | [standalone]


#1438315

FromMika Westerberg <mika.westerberg@linux.intel.com>
Date2016-07-07 10:20 +0200
Message-ID<rScHp-4lY-45@gated-at.bofh.it>
In reply to#1437839
On Wed, Jul 06, 2016 at 12:38:00PM -0400, Paul Gortmaker wrote:
> [Re: [PATCH 3/6] mfd: intel_msic: Make it explicitly non-modular] On 05/07/2016 (Tue 13:08) Mika Westerberg wrote:
> 
> > On Mon, Jul 04, 2016 at 09:25:41PM -0400, Paul Gortmaker wrote:
> > > The Kconfig currently controlling compilation of this code is:
> > > 
> > > drivers/mfd/Kconfig:config MFD_INTEL_MSIC
> > > drivers/mfd/Kconfig:    bool "Intel MSIC"
> > 
> > I would prefer if it could be turned to tristate instead. I don't see
> > any reasons why it should only be builtin.
> 
> If I change it to tristate, it is still impossible to choose =m for it
> unless I revert your earlier commit forcing it to be built in.
> 
> commit 15a713df4145ad2540f8d84c3f4de930806f6151
> Author: Mika Westerberg <mika.westerberg@linux.intel.com>
> Date:   Thu Jan 26 17:35:05 2012 +0000
> 
>     x86/config: Select MSIC MFD driver on Intel Medfield platform
>     
>     On Intel Medfield platform we use MSIC MFD driver to create
>     necessary platform devices so it is essential to have the driver
>     compiled into the kernel.
> 
> If I revert that, then it is possible to choose =m and it compiles.
> (haven't completed modpost yet.. so may be missing symbols...)

I think we can revert that and make it modular. Adding Andy just in case
I'm missing something obvious.

[toc] | [prev] | [next] | [standalone]


#1438508

FromAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Date2016-07-07 12:30 +0200
Message-ID<rSeJc-5D9-25@gated-at.bofh.it>
In reply to#1438315
On Thu, 2016-07-07 at 11:11 +0300, Mika Westerberg wrote:
> On Wed, Jul 06, 2016 at 12:38:00PM -0400, Paul Gortmaker wrote:
> > [Re: [PATCH 3/6] mfd: intel_msic: Make it explicitly non-modular] On
> > 05/07/2016 (Tue 13:08) Mika Westerberg wrote:
> > 
> > > On Mon, Jul 04, 2016 at 09:25:41PM -0400, Paul Gortmaker wrote:
> > > > The Kconfig currently controlling compilation of this code is:
> > > > 
> > > > drivers/mfd/Kconfig:config MFD_INTEL_MSIC
> > > > drivers/mfd/Kconfig:    bool "Intel MSIC"
> > > 
> > > I would prefer if it could be turned to tristate instead. I don't
> > > see
> > > any reasons why it should only be builtin.
> > 
> > If I change it to tristate, it is still impossible to choose =m for
> > it
> > unless I revert your earlier commit forcing it to be built in.
> > 
> > commit 15a713df4145ad2540f8d84c3f4de930806f6151
> > Author: Mika Westerberg <mika.westerberg@linux.intel.com>
> > Date:   Thu Jan 26 17:35:05 2012 +0000
> > 
> >     x86/config: Select MSIC MFD driver on Intel Medfield platform
> >     
> >     On Intel Medfield platform we use MSIC MFD driver to create
> >     necessary platform devices so it is essential to have the driver
> >     compiled into the kernel.
> > 
> > If I revert that, then it is possible to choose =m and it compiles.
> > (haven't completed modpost yet.. so may be missing symbols...)
> 
> I think we can revert that and make it modular. Adding Andy just in
> case
> I'm missing something obvious.

I doubt we may do this. The MID platforms MSIC used for some voltage
regulations and other stuff, moreover it exports an API which might be
used by the code which can be (for now) only compiled in. I wouldn't
take a headache to convert users and check all possible Kconfig
variations (check this gpio-msic.c).

-- 

Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

[toc] | [prev] | [next] | [standalone]


#1438513

FromMika Westerberg <mika.westerberg@linux.intel.com>
Date2016-07-07 12:40 +0200
Message-ID<rSeSR-5H4-7@gated-at.bofh.it>
In reply to#1438508
On Thu, Jul 07, 2016 at 01:26:35PM +0300, Andy Shevchenko wrote:
> On Thu, 2016-07-07 at 11:11 +0300, Mika Westerberg wrote:
> > On Wed, Jul 06, 2016 at 12:38:00PM -0400, Paul Gortmaker wrote:
> > > [Re: [PATCH 3/6] mfd: intel_msic: Make it explicitly non-modular] On
> > > 05/07/2016 (Tue 13:08) Mika Westerberg wrote:
> > > 
> > > > On Mon, Jul 04, 2016 at 09:25:41PM -0400, Paul Gortmaker wrote:
> > > > > The Kconfig currently controlling compilation of this code is:
> > > > > 
> > > > > drivers/mfd/Kconfig:config MFD_INTEL_MSIC
> > > > > drivers/mfd/Kconfig:    bool "Intel MSIC"
> > > > 
> > > > I would prefer if it could be turned to tristate instead. I don't
> > > > see
> > > > any reasons why it should only be builtin.
> > > 
> > > If I change it to tristate, it is still impossible to choose =m for
> > > it
> > > unless I revert your earlier commit forcing it to be built in.
> > > 
> > > commit 15a713df4145ad2540f8d84c3f4de930806f6151
> > > Author: Mika Westerberg <mika.westerberg@linux.intel.com>
> > > Date:   Thu Jan 26 17:35:05 2012 +0000
> > > 
> > >     x86/config: Select MSIC MFD driver on Intel Medfield platform
> > >     
> > >     On Intel Medfield platform we use MSIC MFD driver to create
> > >     necessary platform devices so it is essential to have the driver
> > >     compiled into the kernel.
> > > 
> > > If I revert that, then it is possible to choose =m and it compiles.
> > > (haven't completed modpost yet.. so may be missing symbols...)
> > 
> > I think we can revert that and make it modular. Adding Andy just in
> > case
> > I'm missing something obvious.
> 
> I doubt we may do this. The MID platforms MSIC used for some voltage
> regulations and other stuff, moreover it exports an API which might be
> used by the code which can be (for now) only compiled in. I wouldn't
> take a headache to convert users and check all possible Kconfig
> variations (check this gpio-msic.c).

OK, thanks Andy.

So I withdraw my comment about tristating the driver. Let's make it
explictly non-modular then.

For the patch,

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web