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

Hauke Mehrtens hauke at hauke-m.de
Sun Dec 4 11:15:08 PST 2016


On 12/01/2016 02:57 PM, John Crispin wrote:
> 
> 
> On 01/12/2016 14:47, Boris Brezillon wrote:
>> On Thu, 1 Dec 2016 14:02:55 +0100
>> John Crispin <john at phrozen.org> wrote:
>>
>>> On 01/12/2016 13:36, 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);  
>>>
>>> Hi,
>>>
>>> i would be against exporting the membase pointers as global symbols. i
>>> already find it annoying that cgu and ebu are not static
>>
>> Yep, that's also my opinion.

I also do not like this ebu integration. the ebu lock is also a problem.

>> Let's patch the Kconfig entry instead. BTW, if you don't compile the
>> driver as a module, then you don't need the MODULE_XX() calls, and you
>> can get rid of the module.h header.
>>
> 
> agreed. not sure how hauke tested his patch in the first place.

Sorry, I never tested this as a module, I only used it compiled into the
kernel.

I will send a patch which changes Kconfig.

Hauke



More information about the linux-mtd mailing list