[PATCH] mtd: nand: xway: fix build undefined MODULE_DEVICE_TABLE()

Boris Brezillon boris.brezillon at free-electrons.com
Mon Dec 5 04:10:59 PST 2016


On Sun, 4 Dec 2016 23:40:56 +0100
Hauke Mehrtens <hauke at hauke-m.de> wrote:

> On 12/01/2016 01:36 PM, Boris Brezillon wrote:
> > Hi Hauke,
> > 
> > On Wed, 30 Nov 2016 23:51:10 +0100
> > Hauke Mehrtens <hauke at hauke-m.de> wrote:
> >   
> >> The header file with the definition of MODULE_DEVICE_TABLE() was
> >> missing, add include for linux/module.h to fix the problem in 4.9.  
> > 
> > I tried to enable this driver as a module, and the build failed because
> > of a missing symbol (see the following patch).
> > Now, if it's not supposed to be compiled as a module, then you should
> > modify the Kconfig accordingly.
> > 
> > Regards,
> > 
> > Boris
> >   
> > --->8---  
> > diff --git a/arch/mips/lantiq/xway/sysctrl.c
> > b/arch/mips/lantiq/xway/sysctrl.c index 236193b5210b..29e753556597
> > 100644 --- a/arch/mips/lantiq/xway/sysctrl.c
> > +++ b/arch/mips/lantiq/xway/sysctrl.c
> > @@ -156,6 +156,7 @@ static void __iomem *pmu_membase;
> >  static void __iomem *ltq_xbar_membase;
> >  void __iomem *ltq_cgu_membase;
> >  void __iomem *ltq_ebu_membase;
> > +EXPORT_SYMBOL(ltq_ebu_membase);
> >  
> >  static u32 ifccr = CGU_IFCCR;
> >  static u32 pcicr = CGU_PCICR;
> >   
> 
> Also module_platform_driver() needs linux/module.h, because it contains
> module_init() and some more stuff.

You should use builtin_platform_driver() and not
module_platform_driver().

> 
> I would like to add the include for linux/module.h and deactivate module
> support. It looks like it was possible to select module building since
> it was added, but it should never have worked.
> 
> Hauke




More information about the linux-mtd mailing list