When building kernel with SMIA++/SMIA sensor support, it fails with an error. Unselecting it fixes the build procedure. LD drivers/media/video/smiapp/built-in.o CC [M] drivers/media/video/smiapp/smiapp-core.o CC [M] drivers/media/video/smiapp/smiapp-regs.o /home/dema1701/projects/kernel/linux-3/drivers/media/video/smiapp/smiapp-core.c: In function ‘smiapp_registered’: /home/dema1701/projects/kernel/linux-3/drivers/media/video/smiapp/smiapp-core.c:2472:3: error: implicit declaration of function ‘kzalloc’ [-Werror=implicit-function-declaration] /home/dema1701/projects/kernel/linux-3/drivers/media/video/smiapp/smiapp-core.c:2472:15: warning: assignment makes pointer from integer without a cast [enabled by default] /home/dema1701/projects/kernel/linux-3/drivers/media/video/smiapp/smiapp-core.c:2639:2: error: implicit declaration of function ‘kfree’ [-Werror=implicit-function-declaration] /home/dema1701/projects/kernel/linux-3/drivers/media/video/smiapp/smiapp-core.c: In function ‘smiapp_probe’: /home/dema1701/projects/kernel/linux-3/drivers/media/video/smiapp/smiapp-core.c:2808:9: warning: assignment makes pointer from integer without a cast [enabled by default] cc1: some warnings being treated as errors make[5]: *** [drivers/media/video/smiapp/smiapp-core.o] Error 1
Add an include of <linux/slab.h> to the problem files and let me know if that cures it
It fixes it.
And now at the end of the build: ERROR: "clk_enable" [drivers/media/video/smiapp/smiapp.ko] undefined! ERROR: "clk_disable" [drivers/media/video/smiapp/smiapp.ko] undefined! ERROR: "clk_put" [drivers/media/video/smiapp/smiapp.ko] undefined! ERROR: "clk_get" [drivers/media/video/smiapp/smiapp.ko] undefined! ERROR: "clk_set_rate" [drivers/media/video/smiapp/smiapp.ko] undefined! I made a clean build just in case and it did the same.
Ok thats a different bug to go with it. Can you attach your .config file and I'll have a further look
Created attachment 73587 [details] .config that generates the latest bug
It is the only module having this problem, so I would think it is not related to my .config but I may be wrong.
The .config means I can reproduce your build options. What usually happens in cases like this is that its a specific set of options that mean something that works in most cases (by luck including the needed header or bits) then fails. The .config means I can fix it and verify your config works.
(In reply to comment #7) > The .config means I can reproduce your build options. > > What usually happens in cases like this is that its a specific set of options > that mean something that works in most cases (by luck including the needed > header or bits) then fails. > > The .config means I can fix it and verify your config works. Ah, yes, I see!
Ok done.. it needs the clock layer so adding an && HAVE_CLK to Kconfig sorts it out. I don't think in its current form it was meant to leak into x86 builds. Patch sent to the author Thanks
In Sakari's tree
A patch referencing this bug report has been merged in Linux v3.5-rc5: commit 099987f0aaf28771261b91a41240b9228f2e32b2 Author: Alan Cox <alan@linux.intel.com> Date: Thu Jun 14 09:54:07 2012 -0300 [media] smia: Fix compile failures