[PATCH v3 0/2] dmaengine: Use named initializers for arrays of pci_device_id
From: Uwe Kleine-König (The Capable Hub)
Date: Mon Jul 20 2026 - 08:39:15 EST
Hello,
the objective of this patch series is to prepare drivers/dma for a
change of pci_device_id that requires all users to initialize
.driver_data by name. See
https://lore.kernel.org/all/cover.1780048925.git.u.kleine-koenig@xxxxxxxxxxxx/
for more details. (This is about platform_device_id, but I intend to do
that for pci_device_id in the same manner.)
v2 is available at
https://lore.kernel.org/dmaengine/cover.1781161455.git.ukleinek@xxxxxxxxxx
.
Changes since then:
- Rebase to current next
- Add review tags by Frank Li and Andy Shevchenko
- Fix commit log to talk about the right device_id type (i.e.
pci_device_id and neither pnp nor platform) (partly found by Sashiko)
Note that Andy prefers the use of PCI_DEVICE_DATA() over PCI_VDEVICE() +
explicit .driver_data because the former is more compact and the
follow-up change to struct pci_device_id could be handled in the
definition of that macro. I disagree here, as the compactness is bought
with quite some magic in the #define once it handles the union, and
being explicit (and thus less compact) has its merits, too. Additionally
the affected drivers need an adaption anyhow in their probe function,
and switching both .probe() and the .id_table in a single patch seems
right to me. Because from my POV my subjective opinion is obviously the
right one, I didn't follow Andy's request.
Best regards
Uwe
Uwe Kleine-König (The Capable Hub) (2):
dmaengine: hsu: Drop unused pci driver data
dmaengine: Consistently define pci_device_ids using named initializers
drivers/dma/amd/ptdma/ptdma-pci.c | 4 ++--
drivers/dma/dw-edma/dw-edma-pcie.c | 2 +-
drivers/dma/dw/pci.c | 22 +++++++++++-----------
drivers/dma/hsu/pci.c | 4 ++--
drivers/dma/pch_dma.c | 26 +++++++++++++-------------
5 files changed, 29 insertions(+), 29 deletions(-)
base-commit: 0718283ab28bc3907e10b61a6b4be6fefa1cbb2f
--
2.55.0.11.g153666a7d9bb