From: Jean Delvare Date: Mon, 14 Apr 2014 10:56:34 +0000 (+0200) Subject: driver core: dev_set_drvdata returns void X-Git-Tag: firefly_0821_release~176^2~3465^2~40^2~7 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2c1f1ff0f0d9e0df8c9b6d3697ac250900091541;p=firefly-linux-kernel-4.4.55.git driver core: dev_set_drvdata returns void dev_set_drvdata can no longer fail, so it could return void. All callers have hopefully been updated to no longer check for the return value. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/dd.c b/drivers/base/dd.c index d14b6e895896..d21f4b8dc37b 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -600,9 +600,8 @@ void *dev_get_drvdata(const struct device *dev) } EXPORT_SYMBOL(dev_get_drvdata); -int dev_set_drvdata(struct device *dev, void *data) +void dev_set_drvdata(struct device *dev, void *data) { dev->driver_data = data; - return 0; } EXPORT_SYMBOL(dev_set_drvdata); diff --git a/include/linux/device.h b/include/linux/device.h index 5c94ac3e7972..6d3a75773cd4 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -911,7 +911,7 @@ 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 int dev_set_drvdata(struct device *dev, void *data); +extern void dev_set_drvdata(struct device *dev, void *data); static inline bool device_supports_offline(struct device *dev) {