diff options
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 9e36b6c1810e..4cf89a4b4cbc 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -959,10 +959,8 @@ struct pci_driver { bool driver_managed_dma; }; -static inline struct pci_driver *to_pci_driver(struct device_driver *drv) -{ - return drv ? container_of(drv, struct pci_driver, driver) : NULL; -} +#define to_pci_driver(__drv) \ + ( __drv ? container_of_const(__drv, struct pci_driver, driver) : NULL ) /** * PCI_DEVICE - macro used to describe a specific PCI device |