]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
i2c: eg20t: Consistently define pci_device_ids using named initializers
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Fri, 22 May 2026 20:35:14 +0000 (22:35 +0200)
committerAndi Shyti <andi.shyti@kernel.org>
Tue, 9 Jun 2026 06:44:26 +0000 (08:44 +0200)
The .driver_data member of the struct pci_device_id array were
initialized by list expressions. This isn't easily readable if you're
not into PCI. Using named initializers is more explicit and thus easier
to parse.

This change doesn't introduce changes to the compiled pci_device_id
arrays. Tested on x86 and arm64.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/41316792102ff2860ec019373293cb07d545a0b0.1779481436.git.u.kleine-koenig@baylibre.com
drivers/i2c/busses/i2c-eg20t.c

index f832388688026fa7bb2feb45cae0629a5d26dac9..8c67ab4f2aad333659a5b94478d9b69e9924df18 100644 (file)
@@ -169,11 +169,11 @@ static DEFINE_MUTEX(pch_mutex);
 #define PCI_DEVICE_ID_ML7831_I2C       0x8817
 
 static const struct pci_device_id pch_pcidev_id[] = {
-       { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_PCH_I2C),   1, },
-       { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7213_I2C), 2, },
-       { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7223_I2C), 1, },
-       { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7831_I2C), 1, },
-       {0,}
+       { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_PCH_I2C),   .driver_data = 1 },
+       { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7213_I2C), .driver_data = 2 },
+       { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7223_I2C), .driver_data = 1 },
+       { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7831_I2C), .driver_data = 1 },
+       { }
 };
 MODULE_DEVICE_TABLE(pci, pch_pcidev_id);