PCI: Use designated initialization in PCI_VDEVICE

By using designated initialization in PCI_VDEVICE, like other similar
macros, many "missing initializer" warnings that appear when compiling with
W=2 can be silenced.

Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
Mark Rustad 2014-03-31 14:58:39 -07:00 committed by Bjorn Helgaas
parent 7ee4910ab3
commit c130904096

View file

@ -680,8 +680,8 @@ struct pci_driver {
/** /**
* PCI_VDEVICE - macro used to describe a specific pci device in short form * PCI_VDEVICE - macro used to describe a specific pci device in short form
* @vendor: the vendor name * @vend: the vendor name
* @device: the 16 bit PCI Device ID * @dev: the 16 bit PCI Device ID
* *
* This macro is used to create a struct pci_device_id that matches a * This macro is used to create a struct pci_device_id that matches a
* specific PCI device. The subvendor, and subdevice fields will be set * specific PCI device. The subvendor, and subdevice fields will be set
@ -689,9 +689,9 @@ struct pci_driver {
* private data. * private data.
*/ */
#define PCI_VDEVICE(vendor, device) \ #define PCI_VDEVICE(vend, dev) \
PCI_VENDOR_ID_##vendor, (device), \ .vendor = PCI_VENDOR_ID_##vend, .device = (dev), \
PCI_ANY_ID, PCI_ANY_ID, 0, 0 .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, 0, 0
/* these external functions are only available when PCI support is enabled */ /* these external functions are only available when PCI support is enabled */
#ifdef CONFIG_PCI #ifdef CONFIG_PCI