From 5bde349e55640b2d21fbe0f4f53edabe6878eb91 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sat, 12 Feb 2011 01:11:57 +0000 Subject: [pci] Make driver PCI ID a property of the PCI device Signed-off-by: Michael Brown --- src/include/ipxe/pci.h | 8 +++----- src/include/nic.h | 6 ++---- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'src/include') diff --git a/src/include/ipxe/pci.h b/src/include/ipxe/pci.h index 01df76176..c116f6e09 100644 --- a/src/include/ipxe/pci.h +++ b/src/include/ipxe/pci.h @@ -312,8 +312,8 @@ struct pci_device { * field. */ void *priv; - /** Driver name */ - const char *driver_name; + /** Driver device ID */ + struct pci_device_id *id; }; /** A PCI driver */ @@ -326,11 +326,9 @@ struct pci_driver { * Probe device * * @v pci PCI device - * @v id Matching entry in ID table * @ret rc Return status code */ - int ( * probe ) ( struct pci_device *pci, - const struct pci_device_id *id ); + int ( * probe ) ( struct pci_device *pci ); /** * Remove device * diff --git a/src/include/nic.h b/src/include/nic.h index d5375bd6a..9aaede8a7 100644 --- a/src/include/nic.h +++ b/src/include/nic.h @@ -85,8 +85,7 @@ void legacy_remove ( void *hwdev, #define PCI_DRIVER(_name,_ids,_class) \ static inline int \ - _name ## _pci_legacy_probe ( struct pci_device *pci, \ - const struct pci_device_id *id ); \ + _name ## _pci_legacy_probe ( struct pci_device *pci ); \ static inline void \ _name ## _pci_legacy_remove ( struct pci_device *pci ); \ struct pci_driver _name __pci_driver = { \ @@ -211,8 +210,7 @@ static inline void * legacy_isa_get_drvdata ( void *hwdev ) { _unsafe_disable ( nic, hwdev ); \ } \ static inline int \ - _name ## _pci_legacy_probe ( struct pci_device *pci, \ - const struct pci_device_id *id __unused ) { \ + _name ## _pci_legacy_probe ( struct pci_device *pci ) { \ return legacy_probe ( pci, legacy_pci_set_drvdata, \ &pci->dev, _name ## _probe, \ _name ## _disable ); \ -- cgit v1.2.3-55-g7522