ChangeSet 1.853.1.4, 2002/11/11 17:48:30-08:00, ambx1@neo.rr.com

[PATCH] Re: [PATCH] pnp.h changes - 2.5.46 (4/6)

> Any reason for not just using dev_get_drvdata() and dev_set_drvdata() in
> the drivers?  Or at the least, use them within these functions, that's
> what they are there for :)


Sure, here's a patch.  I think I'll use them within these functions.


diff -Nru a/include/linux/pnp.h b/include/linux/pnp.h
--- a/include/linux/pnp.h	Tue Nov 12 11:14:09 2002
+++ b/include/linux/pnp.h	Tue Nov 12 11:14:09 2002
@@ -75,12 +75,12 @@
 
 static inline void *pnp_get_drvdata (struct pnp_dev *pdev)
 {
-	return pdev->dev.driver_data;
+	return dev_get_drvdata(&pdev->dev);
 }
 
 static inline void pnp_set_drvdata (struct pnp_dev *pdev, void *data)
 {
-	pdev->dev.driver_data = data;
+	dev_set_drvdata(&pdev->dev, data);
 }
 
 static inline void *pnp_get_protodata (struct pnp_dev *pdev)
