In [1], Christoph Hellwig has proposed to remove the wrappers in include/linux/pci-dma-compat.h. Some reasons why this API should be removed have been given by Julia Lawall in [2]. However, updating 'drivers/char/xillybus' is a bit tricky because of its use of 'struct xilly_mapping' and 'struct xilly_endpoint'. The first patch is just the easy part of the pci_ --> dma_ conversion. This is mostly done with a coccinelle script. The second updates 'struct xilly_mapping' (and code using it) to explicitly use the dma_ API. The third takes care of 'struct xilly_endpoint' (and code using it). Finally, the 4th patch is a clean-up to remove a now useless parameter from 'xillybus_init_endpoint()' These changes also offert the opportunity to merge some code from 'xillybus_pcie.c' and 'xillybus_of.c' into 'xillybus_core.c'. See 'xilly_dma_sync_single_for_cpu_of()' and 'xilly_dma_sync_single_for_cpu_pci()' for example. This goes beyond the scope of removing the usage of the deprecated 'pci-dma-compat.h' API. The need of 'xilly_pci_direction()' should then be discussed. It could be included afterwards it required. All these patches have been compile tested only. [1]: https://lore.kernel.org/kernel-janitors/20200421081257.GA131897@xxxxxxxxxxxxx/ [2]: https://lore.kernel.org/kernel-janitors/alpine.DEB.2.22.394.2007120902170.2424@hadrien/ Christophe JAILLET (4): char: xillybus: Remove usage of the deprecated 'pci-dma-compat.h' API char: xillybus: Remove usage of 'pci_unmap_single()' char: xillybus: Remove usage of remaining deprecated pci_ API char: xillybus: Simplify 'xillybus_init_endpoint()' drivers/char/xillybus/xillybus.h | 10 ++------ drivers/char/xillybus/xillybus_core.c | 4 +--- drivers/char/xillybus/xillybus_of.c | 2 +- drivers/char/xillybus/xillybus_pcie.c | 33 ++++++++++++--------------- 4 files changed, 18 insertions(+), 31 deletions(-) -- 2.30.2