happycube / cxadc-linux3

CX2388x direct ADC capture driver, updated for Linux 3.x+ and 64-bit
81 stars 18 forks source link

Don't use deprecated pci_{alloc,free}_consistent #31

Closed atsampson closed 1 year ago

atsampson commented 1 year ago

These were removed in Linux 5.18, but they were only wrappers around the dma_alloc_coherent API which has been around since Linux 2.6 (and was used elsewhere in cxadc), so there shouldn't be any need for a compatibility test here.

Along with this, make all the allocations use GFP_KERNEL rather than GFP_ATOMIC -- they're being done in module init context so there's no need for the latter.

CC @oyvindln - I've tested that this compiles and loads with Linux 6.1, but I haven't tested a capture since I don't have a card plugged in at the moment...

Fixes #28.

atsampson commented 1 year ago

rawktucc on IRC reports " it works".

happycube commented 1 year ago

Thanks!