summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Richter <adam@yggdrasil.com>2002-11-29 09:18:05 -0800
committerGreg Kroah-Hartman <greg@kroah.com>2002-11-29 09:18:05 -0800
commit19652e26a6ad17bb54b3d882041ed24cf6dceaeb (patch)
tree46dea55b8a204f38d636f58c90bce76995f47951
parent0c2a8e2642eb29562727da4a45e6ca6b424aa616 (diff)
[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.
-rw-r--r--include/linux/pci.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 30c4a9dbc855..3226857c6269 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -344,7 +344,6 @@ struct pci_dev {
u8 rom_base_reg; /* which config register controls the ROM */
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
device implements. Normally this is
0xffffffff. You only need to change
@@ -753,12 +752,12 @@ static inline int pci_module_init(struct pci_driver *drv)
*/
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)
{
- pdev->driver_data = data;
+ pdev->dev.driver_data = data;
}
/*