Skip to contentSkip to conversation

rtc: use struct device as the first argument for devm_rtc_device_register()

PATCH New Jingoo Han 1 participant 1 message Mar 6, 2013 Real time clock (RTC)

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 rtc: use struct device as the first argument for devm_rtc_device_register()

Other devm_* APIs use 'struct evice *dev' as the first argument. Thus, in order to sync with other devm_* functions, struct device is used as the first argument for devm_rtc_device_register().

---
 drivers/rtc/class.c |    6 +++---
 include/linux/rtc.h |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/rtc/class.c +3 -3
index b72b40b..6638540 100644
@@ -275,8 +275,8 @@ static int devm_rtc_device_match(struct device *dev, void *res, void *data)
 
 /**
  * devm_rtc_device_register - resource managed rtc_device_register()
- * @name: the name of the device
  * @dev: the device to register
+ * @name: the name of the device
  * @ops: the rtc operations structure
  * @owner: the module owner
  *
@@ -287,8 +287,8 @@ static int devm_rtc_device_match(struct device *dev, void *res, void *data)
  * for more information.
  */
 
-struct rtc_device *devm_rtc_device_register(const char *name,
-					struct device *dev,
+struct rtc_device *devm_rtc_device_register(struct device *dev,
+					const char *name,
 					const struct rtc_class_ops *ops,
 					struct module *owner)
 {
include/linux/rtc.h +2 -2
index d955768..c2c2897 100644
@@ -133,8 +133,8 @@ extern struct rtc_device *rtc_device_register(const char *name,
 					struct device *dev,
 					const struct rtc_class_ops *ops,
 					struct module *owner);
-extern struct rtc_device *devm_rtc_device_register(const char *name,
-					struct device *dev,
+extern struct rtc_device *devm_rtc_device_register(struct device *dev,
+					const char *name,
 					const struct rtc_class_ops *ops,
 					struct module *owner);
 extern void rtc_device_unregister(struct rtc_device *rtc);
Signature · 1 line
1.7.2.5