All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RTC: rtc-ab3100 - Add missing platform_set_drvdata() in ab3100_rtc_probe()
@ 2010-09-19 10:22 Axel Lin
  2010-09-20  2:00 ` Wan ZongShun
  2010-09-20  9:29 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2010-09-19 10:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alessandro Zummo, Mattias Wallin, Linus Walleij, rtc-linux

Otherwise, calling platform_get_drvdata() in ab3100_rtc_remove() return NULL.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/rtc/rtc-ab3100.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/rtc/rtc-ab3100.c b/drivers/rtc/rtc-ab3100.c
index d26780e..261a07e 100644
--- a/drivers/rtc/rtc-ab3100.c
+++ b/drivers/rtc/rtc-ab3100.c
@@ -235,6 +235,7 @@ static int __init ab3100_rtc_probe(struct platform_device *pdev)
 		err = PTR_ERR(rtc);
 		return err;
 	}
+	platform_set_drvdata(pdev, rtc);
 
 	return 0;
 }
@@ -244,6 +245,7 @@ static int __exit ab3100_rtc_remove(struct platform_device *pdev)
 	struct rtc_device *rtc = platform_get_drvdata(pdev);
 
 	rtc_device_unregister(rtc);
+	platform_set_drvdata(pdev, NULL);
 	return 0;
 }
 
-- 
1.7.0.4




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

* Re: [PATCH] RTC: rtc-ab3100 - Add missing platform_set_drvdata() in ab3100_rtc_probe()
  2010-09-19 10:22 [PATCH] RTC: rtc-ab3100 - Add missing platform_set_drvdata() in ab3100_rtc_probe() Axel Lin
@ 2010-09-20  2:00 ` Wan ZongShun
  2010-09-20  9:29 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Wan ZongShun @ 2010-09-20  2:00 UTC (permalink / raw)
  To: Axel Lin, Andrew Morton
  Cc: linux-kernel, Alessandro Zummo, Mattias Wallin, Linus Walleij, rtc-linux

Hi Axel ,

2010/9/19 Axel Lin <axel.lin@gmail.com>:
> Otherwise, calling platform_get_drvdata() in ab3100_rtc_remove() return NULL.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Acked-by:Wan ZongShun <mcuos.com@gmail.com>

> ---
>  drivers/rtc/rtc-ab3100.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/rtc/rtc-ab3100.c b/drivers/rtc/rtc-ab3100.c
> index d26780e..261a07e 100644
> --- a/drivers/rtc/rtc-ab3100.c
> +++ b/drivers/rtc/rtc-ab3100.c
> @@ -235,6 +235,7 @@ static int __init ab3100_rtc_probe(struct platform_device *pdev)
>                err = PTR_ERR(rtc);
>                return err;
>        }
> +       platform_set_drvdata(pdev, rtc);
>
>        return 0;
>  }
> @@ -244,6 +245,7 @@ static int __exit ab3100_rtc_remove(struct platform_device *pdev)
>        struct rtc_device *rtc = platform_get_drvdata(pdev);
>
>        rtc_device_unregister(rtc);
> +       platform_set_drvdata(pdev, NULL);
>        return 0;
>  }
>
> --
> 1.7.0.4
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>



-- 
*linux-arm-kernel mailing list
mail addr:linux-arm-kernel@lists.infradead.org
you can subscribe by:
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

* linux-arm-NUC900 mailing list
mail addr:NUC900@googlegroups.com
main web: https://groups.google.com/group/NUC900
you can subscribe it by sending me mail:
mcuos.com@gmail.com

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

* Re: [PATCH] RTC: rtc-ab3100 - Add missing platform_set_drvdata() in ab3100_rtc_probe()
  2010-09-19 10:22 [PATCH] RTC: rtc-ab3100 - Add missing platform_set_drvdata() in ab3100_rtc_probe() Axel Lin
  2010-09-20  2:00 ` Wan ZongShun
@ 2010-09-20  9:29 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2010-09-20  9:29 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Alessandro Zummo, Mattias WALLIN, rtc-linux

Axel Lin wrote:

> Otherwise, calling platform_get_drvdata() in ab3100_rtc_remove() return NULL.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Ah thanks!

Acked-by: Linus Walleij <linus.walleij@stericsson.com>

Yours,
Linus Walleij

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

end of thread, other threads:[~2010-09-20  9:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-19 10:22 [PATCH] RTC: rtc-ab3100 - Add missing platform_set_drvdata() in ab3100_rtc_probe() Axel Lin
2010-09-20  2:00 ` Wan ZongShun
2010-09-20  9:29 ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.