]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scsi: ufs: ufshcd-pci: Use PCI_VDEVICE and named initializers for pci array
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Tue, 5 May 2026 08:28:53 +0000 (10:28 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 15 May 2026 01:39:23 +0000 (21:39 -0400)
commit8ef4c72dbbfda41b8f83a9b5a275feaf4a30ea21
tree32de1c54c0680d47ef566411a66f55845a4428fc
parent2a18c57560f454e2e63373ecf00e4a6fb0265600
scsi: ufs: ufshcd-pci: Use PCI_VDEVICE and named initializers for pci array

The pci_device_id array uses a mixture of ways to initialize
ufshcd_pci_tbl[]. List initializers are hard to read unless you memoized
the order of the struct members. Use the PCI_VDEVICE for all entries and
a named initializer for .driver_data.

This allows to idiomatically assign the members without using zeros to
fill the fields before .driver_data (either explicitly or hidding in
PCI_VDEVICE()).

There are no changes to the compiled result of the array; verified with
builds for x86 and arm64.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://patch.msgid.link/6cac1c22381f7026edad9854d70833381d14929a.1777968942.git.u.kleine-koenig@baylibre.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/host/ufshcd-pci.c