diff options
-rw-r--r-- | include/linux/platform_device.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 2e700ec0601f..d96db9825708 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -130,8 +130,15 @@ extern void platform_driver_unregister(struct platform_driver *); | |||
130 | extern int platform_driver_probe(struct platform_driver *driver, | 130 | extern int platform_driver_probe(struct platform_driver *driver, |
131 | int (*probe)(struct platform_device *)); | 131 | int (*probe)(struct platform_device *)); |
132 | 132 | ||
133 | #define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) | 133 | static inline void *platform_get_drvdata(const struct platform_device *pdev) |
134 | #define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data)) | 134 | { |
135 | return dev_get_drvdata(&pdev->dev); | ||
136 | } | ||
137 | |||
138 | static inline void platform_set_drvdata(struct platform_device *pdev, void *data) | ||
139 | { | ||
140 | dev_set_drvdata(&pdev->dev, data); | ||
141 | } | ||
135 | 142 | ||
136 | extern struct platform_device *platform_create_bundle(struct platform_driver *driver, | 143 | extern struct platform_device *platform_create_bundle(struct platform_driver *driver, |
137 | int (*probe)(struct platform_device *), | 144 | int (*probe)(struct platform_device *), |