disable modules and get "multiple definition" errors?

Geert Uytterhoeven Geert.Uytterhoeven at sonycom.com
Fri Aug 22 18:39:10 EST 2008


On Thu, 21 Aug 2008, Kevin Diggs wrote:
> 	I am trying to do some compile testing of my cpufreq driver. If
> I disable modules I am getting multiple definition errors of inline
> functions:
> 
> inline volatile unsigned int get_PLL(void)
> {
> unsigned int ret;
> 
>         __asm__ __volatile__ ("mfspr %0,%1":
>                 "=r"(ret):
>                 "i"(SPRN_HID1)
>         );
> 
>         return ret;
> }
> 
> arch/powerpc/kernel/cpu/pll_if.o(.text+0x1c): In function `get_PLL':
> : multiple definition of `get_PLL'
> arch/powerpc/kernel/cpu/cpufreq/built-in.o(.text+0x0): first defined here
> 
> What am I doing wrong?

You forgot to make the inline functions static?

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven at sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010


More information about the Linuxppc-dev mailing list