[usb] Add USB_ROM() and USB_ID() macros
Add USB_ROM() and USB_ID() macros following the pattern for PCI_ROM() and PCI_ID(), to allow for the possibility of including USB network devices within the "all-drivers" build of iPXE. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -1369,6 +1369,18 @@ struct usb_device_id {
|
||||
unsigned long driver_data;
|
||||
};
|
||||
|
||||
/* Define a USB device ID */
|
||||
#define USB_ID( _vendor, _product, _name, _description, _data ) { \
|
||||
.vendor = _vendor, \
|
||||
.product = _product, \
|
||||
.name = _name, \
|
||||
.driver_data = _data \
|
||||
}
|
||||
|
||||
/* Define a USB device ID with a corresponding build rule */
|
||||
#define USB_ROM( _vendor, _product, _name, _description, _data ) \
|
||||
USB_ID ( _vendor, _product, _name, _description, _data )
|
||||
|
||||
/** Match-anything ID */
|
||||
#define USB_ANY_ID 0xffff
|
||||
|
||||
|
||||
Reference in New Issue
Block a user