]> git.itanic.dy.fi Git - linux-stable/commitdiff
devres: rename the first parameter of devm_add_action(_or_reset)
authorMasahiro Yamada <masahiroy@kernel.org>
Fri, 8 Sep 2023 13:58:40 +0000 (22:58 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Oct 2023 09:15:52 +0000 (11:15 +0200)
The first parameter of devm_add_action(_or_reset) is a device.
The name 'release' is confusing because it is often used for
dr_release_t in the devres context.

Rename it to 'dev'. No functional change intended.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20230908135840.2362708-1-masahiroy@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/device.h

index 56d93a1ffb7b6a619e30249b4b1ddabdc5750e67..d7a72a8749ea03e413868a87470b3e8df074c737 100644 (file)
@@ -389,8 +389,8 @@ void devm_remove_action(struct device *dev, void (*action)(void *), void *data);
 void devm_release_action(struct device *dev, void (*action)(void *), void *data);
 
 int __devm_add_action(struct device *dev, void (*action)(void *), void *data, const char *name);
-#define devm_add_action(release, action, data) \
-       __devm_add_action(release, action, data, #action)
+#define devm_add_action(dev, action, data) \
+       __devm_add_action(dev, action, data, #action)
 
 static inline int __devm_add_action_or_reset(struct device *dev, void (*action)(void *),
                                             void *data, const char *name)
@@ -403,8 +403,8 @@ static inline int __devm_add_action_or_reset(struct device *dev, void (*action)(
 
        return ret;
 }
-#define devm_add_action_or_reset(release, action, data) \
-       __devm_add_action_or_reset(release, action, data, #action)
+#define devm_add_action_or_reset(dev, action, data) \
+       __devm_add_action_or_reset(dev, action, data, #action)
 
 /**
  * devm_alloc_percpu - Resource-managed alloc_percpu