This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

compiling kernel errors

I'm getting this errors when I'm compiling the kernel for the DM368, but I have not made any changes on the mt9p031.c file, I had made changes on other files like but why I'm getting errors on this one?

 

  CC      drivers/media/video/mt9p031.o
  CC      lib/ioremap.o
drivers/media/video/mt9p031.c: In function 'mt9p031_get_register':
drivers/media/video/mt9p031.c:575: warning: ISO C90 forbids mixed declarations and code
drivers/media/video/mt9p031.c:575: warning: unused variable 'mt9p031'
drivers/media/video/mt9p031.c: In function 'mt9p031_set_register':
drivers/media/video/mt9p031.c:595: warning: unused variable 'mt9p031'
drivers/media/video/mt9p031.c: At top level:
drivers/media/video/mt9p031.c:625: error: unknown field 'get_register' specified in initializer
drivers/media/video/mt9p031.c:625: warning: initialization from incompatible pointer type
drivers/media/video/mt9p031.c:626: error: unknown field 'set_register' specified in initializer
  CC      lib/irq_regs.o
drivers/media/video/mt9p031.c: In function 'mt9p031_querystd':
drivers/media/video/mt9p031.c:813: warning: unused variable 'mt9p031'
drivers/media/video/mt9p031.c:812: warning: unused variable 'client'
drivers/media/video/mt9p031.c: In function 'mt9p031_set_standard':
drivers/media/video/mt9p031.c:824: warning: unused variable 'mt9p031'
drivers/media/video/mt9p031.c:823: warning: unused variable 'client'
make[3]: *** [drivers/media/video/mt9p031.o] Error 1
make[2]: *** [drivers/media/video] Error 2
make[1]: *** [drivers/media] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....

  • I would guess you used "Enable advanced debug functionality" in the video portion of the kernel config. That set the CONFIG_VIDEO_ADV_DEBUG flag and causes the problem code to be pulled in. Looks someone at TI did not test compile with this flag on for this version of the kernel. The field names should be "g_register" and "s_register" instead of "get_register" and "set_register". I'd call this bug. For now, you could try changing the field names in mt9p031.c.

     

  • Hi Andre,

     

    From which branch are you trying to build, please provide the details.

     

    Best Regards

    Prabhakar Lad

  • Hi, thanks for the advice, was just some configurations in the kernel I miss, nothing wrong with the code, but the image comes a bit over expose, I try to do some changes on the driver but that didnt work, any ideas where I should be looking at?