patjak / facetimehd

Reverse engineered Linux driver for the FacetimeHD (Broadcom 1570) PCIe webcam
GNU General Public License v2.0
1.36k stars 160 forks source link

Fix build on 5.6 due to ioremap_nocache removal #203

Closed newperson1746 closed 4 years ago

newperson1746 commented 4 years ago

5.6 removed ioremap_nocache and other wrappers which are identical to ioremap. https://lkml.org/lkml/2020/1/27/585 Simply renaming and removing nocache fixes build for 5.6 which would otherwise fail when linking facetimehd.ko with undefined ioremap_nocache. It also doesn't break build on older kernels.

sunshine69 commented 4 years ago

Does it stop working with earlier kernel?

I did myself but I put something like this

    #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
    dev_priv->s2_io = ioremap(start, len);
    #else
    dev_priv->s2_io = ioremap_nocache(start, len);
    #endif

OK Just saw the comment saying it does not break with earlier kernel. Ignore me!

araspik commented 4 years ago

This is necessary for compiling now (tried it myself, and it works). Please merge it!

patjak commented 4 years ago

Fix got merged a while ago so closing this PR