Re: [PATCH] PCI Hotplug changes for 2.5.50

From: Greg KH (greg@kroah.com)
Date: Mon Dec 02 2002 - 03:26:29 EST


ChangeSet 1.924.3.3, 2002/11/30 01:28:13-08:00, greg@kroah.com

PCI: changed pci_?et_drvdata to use the generic driver model functions
     instead of accessing the data directly.

diff -Nru a/include/linux/pci.h b/include/linux/pci.h
--- a/include/linux/pci.h Sun Dec 1 23:26:20 2002
+++ b/include/linux/pci.h Sun Dec 1 23:26:20 2002
@@ -747,17 +747,17 @@
           pci_resource_start((dev),(bar)) + 1))
 
 /* Similar to the helpers above, these manipulate per-pci_dev
- * driver-specific data. Currently stored as pci_dev::driver_data,
- * a void pointer, but it is not present on older kernels.
+ * driver-specific data. They are really just a wrapper around
+ * the generic device structure functions of these calls.
  */
 static inline void *pci_get_drvdata (struct pci_dev *pdev)
 {
- return pdev->dev.driver_data;
+ return dev_get_drvdata(&pdev->dev);
 }
 
 static inline void pci_set_drvdata (struct pci_dev *pdev, void *data)
 {
- pdev->dev.driver_data = data;
+ dev_set_drvdata(&pdev->dev, data);
 }
 
 /*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Dec 07 2002 - 22:00:12 EST