Hello, On Wed, May 06, 2026 at 07:44:12PM +0200, Uwe Kleine-König (The Capable Hub) wrote: > Some pci_device_id arrays already used the PCI_DEVICE macros, others > used named initializers or list initializers. Unify all to use the > PCI_DEVICE macros and (if applicable) a named initializer for > .driver_data. Also drop all zeros that the compiler can care for and > unify indention and spacing. > > There are no changes introduced by this commit to the compiled arrays for > ARCH=x86 and ARCH=arm64 builds. > > Signed-off-by: Uwe Kleine-König (The Capable Hub) > <[email protected]> > --- > Hello, > > this is a preparing change for making struct pci_device_id::driver_data > an anonymous union (similar to > https://lore.kernel.org/all/[email protected]/). > This requires named initializers for .driver_data. Not all changes here > are required for that, but I expanded the quest to unify a bit more than > necessary. > > I put all changes in a single patch, if you prefer it being split I can do > that.
I just noticed I failed to put the following hunk into the patch:
diff --git a/include/media/drv-intf/saa7146.h b/include/media/drv-intf/saa7146.h
index 71ce63c99cb4..b8f2fe5680f0 100644
--- a/include/media/drv-intf/saa7146.h
+++ b/include/media/drv-intf/saa7146.h
@@ -77,13 +77,10 @@ struct saa7146_pci_extension_data {
void *ext_priv; /* most likely a name string */
};
-#define MAKE_EXTENSION_PCI(x_var, x_vendor, x_device) \
- { \
- .vendor = PCI_VENDOR_ID_PHILIPS, \
- .device = PCI_DEVICE_ID_PHILIPS_SAA7146, \
- .subvendor = x_vendor, \
- .subdevice = x_device, \
- .driver_data = (unsigned long)& x_var, \
+#define MAKE_EXTENSION_PCI(x_var, x_vendor, x_device)
\
+ {
\
+ PCI_VDEVICE_SUB(PHILIPS, PCI_DEVICE_ID_PHILIPS_SAA7146,
(x_vendor), (x_device)),\
+ .driver_data = (unsigned long)&(x_var),
\
}
struct saa7146_extension
but that's not urgent as the current definition of MAKE_EXTENSION_PCI()
is good enough to not block the next step of my quest. I'll address that
in a v2 (if it comes to that) or later together with the next step
making the driver_data line:
.driver_data_ptr = &(x_var),
(or if you apply this version, feel free to squash the diff into the
commit).
Best regards
Uwe
signature.asc
Description: PGP signature
_______________________________________________ Mjpeg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mjpeg-users
