mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] rtc: use struct device as the first argument for devm_rtc_device_register()
@ 2013-03-06  6:55 Jingoo Han
  0 siblings, 0 replies; only message in thread
From: Jingoo Han @ 2013-03-06  6:55 UTC (permalink / raw)
  To: 'Andrew Morton'
  Cc: linux-kernel, 'Tejun Heo', 'Alessandro Zummo',
	rtc-linux, 'Jingoo Han'

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().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/rtc/class.c |    6 +++---
 include/linux/rtc.h |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c
index b72b40b..6638540 100644
--- a/drivers/rtc/class.c
+++ b/drivers/rtc/class.c
@@ -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)
 {
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index d955768..c2c2897 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -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);
-- 
1.7.2.5



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-03-06  6:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-06  6:55 [PATCH] rtc: use struct device as the first argument for devm_rtc_device_register() Jingoo Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®