dev_set_drvdata and dev_get_drvdata are now simple enough again that
we can inline them as they used to be before commit b40284378.

Signed-off-by: Jean Delvare <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
---
 drivers/base/dd.c      |   16 ----------------
 include/linux/device.h |   12 ++++++++++--
 2 files changed, 10 insertions(+), 18 deletions(-)

--- linux-3.15-rc1.orig/drivers/base/dd.c       2014-04-14 12:54:23.994967807 
+0200
+++ linux-3.15-rc1/drivers/base/dd.c    2014-04-14 12:54:24.491979944 +0200
@@ -570,19 +570,3 @@ void driver_detach(struct device_driver
                put_device(dev);
        }
 }
-
-/*
- * These exports can't be _GPL due to .h files using this within them, and it
- * might break something that was previously working...
- */
-void *dev_get_drvdata(const struct device *dev)
-{
-       return dev->driver_data;
-}
-EXPORT_SYMBOL(dev_get_drvdata);
-
-void dev_set_drvdata(struct device *dev, void *data)
-{
-       dev->driver_data = data;
-}
-EXPORT_SYMBOL(dev_set_drvdata);
--- linux-3.15-rc1.orig/include/linux/device.h  2014-04-14 12:54:18.863842502 
+0200
+++ linux-3.15-rc1/include/linux/device.h       2014-04-14 12:54:24.492979969 
+0200
@@ -832,6 +832,16 @@ static inline void set_dev_node(struct d
 }
 #endif
 
+static inline void *dev_get_drvdata(const struct device *dev)
+{
+       return dev->driver_data;
+}
+
+static inline void dev_set_drvdata(struct device *dev, void *data)
+{
+       dev->driver_data = data;
+}
+
 static inline struct pm_subsys_data *dev_to_psd(struct device *dev)
 {
        return dev ? dev->power.subsys_data : NULL;
@@ -916,8 +926,6 @@ extern int device_move(struct device *de
 extern const char *device_get_devnode(struct device *dev,
                                      umode_t *mode, kuid_t *uid, kgid_t *gid,
                                      const char **tmp);
-extern void *dev_get_drvdata(const struct device *dev);
-extern void dev_set_drvdata(struct device *dev, void *data);
 
 static inline bool device_supports_offline(struct device *dev)
 {

-- 
Jean Delvare
SUSE L3 Support
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to