linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/rtc/rtc-tegra.c: fix build warning
@ 2013-03-20 12:27 Laxman Dewangan
  0 siblings, 0 replies; 2+ messages in thread
From: Laxman Dewangan @ 2013-03-20 12:27 UTC (permalink / raw)
  To: akpm
  Cc: swarren, a.zummo, rtc-linux, linux-tegra, linux-kernel, Laxman Dewangan

Fix the below build warning:

drivers/rtc/rtc-tegra.c: In function 'tegra_rtc_probe':
drivers/rtc/rtc-tegra.c:353:33: warning: passing argument 1 of 'devm_rtc_device_register' from incompatible pointer type [enabled by default]
include/linux/rtc.h:136:27: note: expected 'struct device *' but argument is of type 'const char *'
drivers/rtc/rtc-tegra.c:353:33: warning: passing argument 2 of 'devm_rtc_device_register' from incompatible pointer type [enabled by default]
include/linux/rtc.h:136:27: note: expected 'const char *' but argument is of type 'struct device *'

This warning was introduced with patch
	commit 8a96d445e921b0d881421767fb6f7c5b6fb91b3a
	drivers/rtc/rtc-tegra.c: use managed rtc_device_register()

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/rtc/rtc-tegra.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c
index 7cb3da0..a34315d 100644
--- a/drivers/rtc/rtc-tegra.c
+++ b/drivers/rtc/rtc-tegra.c
@@ -349,8 +349,9 @@ static int __init tegra_rtc_probe(struct platform_device *pdev)
 
 	device_init_wakeup(&pdev->dev, 1);
 
-	info->rtc_dev = devm_rtc_device_register(dev_name(&pdev->dev),
-				&pdev->dev, &tegra_rtc_ops, THIS_MODULE);
+	info->rtc_dev = devm_rtc_device_register(&pdev->dev,
+				dev_name(&pdev->dev), &tegra_rtc_ops,
+				THIS_MODULE);
 	if (IS_ERR(info->rtc_dev)) {
 		ret = PTR_ERR(info->rtc_dev);
 		dev_err(&pdev->dev, "Unable to register device (err=%d).\n",
-- 
1.7.1.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drivers/rtc/rtc-tegra.c: fix build warning
@ 2013-03-21  2:16 Jingoo Han
  0 siblings, 0 replies; 2+ messages in thread
From: Jingoo Han @ 2013-03-21  2:16 UTC (permalink / raw)
  To: ldewangan; +Cc: akpm, linux-kernel, a.zummo, rtc-linux, jg1.han

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=euc-kr, Size: 2049 bytes --]

On Wed, 20 Mar 2013 05:30:25 -0700, Laxman Dewangan wrote:
>
> Fix the below build warning:
>
> drivers/rtc/rtc-tegra.c: In function 'tegra_rtc_probe':
> drivers/rtc/rtc-tegra.c:353:33: warning: passing argument 1 of 
> 'devm_rtc_device_register' from incompatible pointer type [enabled by default]
> include/linux/rtc.h:136:27: note: expected 'struct device *' but argument is of 
> type 'const char *'
> drivers/rtc/rtc-tegra.c:353:33: warning: passing argument 2 of 
> 'devm_rtc_device_register' from incompatible pointer type [enabled by default]
> include/linux/rtc.h:136:27: note: expected 'const char *' but argument is of 
> type 'struct device *'
> This warning was introduced with patch
>         commit 8a96d445e921b0d881421767fb6f7c5b6fb91b3a
>         drivers/rtc/rtc-tegra.c: use managed rtc_device_register()
>
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>

It looks good.

Reviewed-by: Jingoo Han <jg1.han@samsung.com>

Best regards,
Jingoo Han

> ---
>  drivers/rtc/rtc-tegra.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c
> index 7cb3da0..a34315d 100644
> --- a/drivers/rtc/rtc-tegra.c
> +++ b/drivers/rtc/rtc-tegra.c
> @@ -349,8 +349,9 @@ static int __init tegra_rtc_probe(struct platform_device 
> *pdev)
>  
>         device_init_wakeup(&pdev->dev, 1);
>  
> -       info->rtc_dev = devm_rtc_device_register(dev_name(&pdev->dev),
> -                               &pdev->dev, &tegra_rtc_ops, THIS_MODULE);
> +       info->rtc_dev = devm_rtc_device_register(&pdev->dev,
> +                               dev_name(&pdev->dev), &tegra_rtc_ops,
> +                               THIS_MODULE);
>         if (IS_ERR(info->rtc_dev)) {
>                 ret = PTR_ERR(info->rtc_dev);
>                 dev_err(&pdev->dev, "Unable to register device (err=%d).\n",
> -- 
> 1.7.1.1
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-21  2:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-20 12:27 [PATCH] drivers/rtc/rtc-tegra.c: fix build warning Laxman Dewangan
2013-03-21  2:16 Jingoo Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).