ljalves / linux_media

TBS linux open source drivers
https://github.com/ljalves/linux_media/wiki
Other
88 stars 151 forks source link

saa716x: Fix two compiler errors #106

Closed bas-t closed 9 years ago

bas-t commented 9 years ago

Hi Luis, compiling the beloved saa716x driver into linux-4.2-rc1 results in two compiler errors, due to lacking includes. This patch fixes that. The errors are:

CC [M] drivers/media/pci/saa716x/saa716x_pci.o In file included from drivers/media/pci/saa716x/saa716x_pci.c:2:0: ./arch/x86/include/asm/pgtable.h:31:8: error: unknown type name ‘spinlock_t’ extern spinlock_t pgd_lock; ^ In file included from ./arch/x86/include/asm/pgtable.h:425:0, from drivers/media/pci/saa716x/saa716x_pci.c:2: ./arch/x86/include/asm/pgtable_64.h: In function ‘native_ptep_get_and_clear’: ./arch/x86/include/asm/pgtable_64.h:76:2: error: implicit declaration of function ‘xchg’ [-Werror=implicit-function-declaration] return native_make_pte(xchg(&xp->pte, 0)); ^

bas-t commented 9 years ago

Hi, as it turns out, the errors only seem to be there when the saa716x driver is compiled directly into the 4.2-rc1 kernel tree. Not when putting it on top of today's upstream media_tree. Don't know why. Anyhow, this needs more attention (or it disappears with 4.2 RC2 or RC3 or so)

bas-t commented 9 years ago

I just assumed that I actually need the offending include, hence the PR. But after compiling intree without it (removed include asm/pgtable.h), it seems that the include was nothing more then a leftover from the dark ages. I mean: the driver compiles without errors and my TBS 6281/6285 cards continue to work great.

Sorry for the noise, closing.