Commit 19652e26 authored by Adam J. Richter's avatar Adam J. Richter Committed by Greg Kroah-Hartman

[PATCH] Patch/resubmit(2.5.50): Eliminate pci_dev.driver_data

	To review, this patch deletes pci_dev.driver_data, using the
existing pci_dev.device.driver_data field instead, thereby shrinking
struct pci_dev by four bytes on 32-bit machines.  The few device
drivers that attempted to directly reference pci_dev.driver_data were
fixed in a patch of mine that Jeff Garzik got into 2.5.45.  Also,
making this change should help with memory allocation improvements in
the future, although that's a separate issue.
parent 0c2a8e26
...@@ -344,7 +344,6 @@ struct pci_dev { ...@@ -344,7 +344,6 @@ struct pci_dev {
u8 rom_base_reg; /* which config register controls the ROM */ u8 rom_base_reg; /* which config register controls the ROM */
struct pci_driver *driver; /* which driver has allocated this device */ struct pci_driver *driver; /* which driver has allocated this device */
void *driver_data; /* data private to the driver */
u64 dma_mask; /* Mask of the bits of bus address this u64 dma_mask; /* Mask of the bits of bus address this
device implements. Normally this is device implements. Normally this is
0xffffffff. You only need to change 0xffffffff. You only need to change
...@@ -753,12 +752,12 @@ static inline int pci_module_init(struct pci_driver *drv) ...@@ -753,12 +752,12 @@ static inline int pci_module_init(struct pci_driver *drv)
*/ */
static inline void *pci_get_drvdata (struct pci_dev *pdev) static inline void *pci_get_drvdata (struct pci_dev *pdev)
{ {
return pdev->driver_data; return pdev->dev.driver_data;
} }
static inline void pci_set_drvdata (struct pci_dev *pdev, void *data) static inline void pci_set_drvdata (struct pci_dev *pdev, void *data)
{ {
pdev->driver_data = data; pdev->dev.driver_data = data;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment