Re: [PATCH] RTC: rtc-ab3100 - Add missing platform_set_drvdata() in ab3100_rtc_probe()

From: Wan ZongShun
Date: Sun Sep 19 2010 - 22:00:21 EST


Hi Axel ,

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

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

> ---
> Â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@xxxxxxxxxxxxxxx
> 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@xxxxxxxxxxxxxxxxxxx
you can subscribe by:
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

* linux-arm-NUC900 mailing list
mail addr:NUC900@xxxxxxxxxxxxxxxx
main web: https://groups.google.com/group/NUC900
you can subscribe it by sending me mail:
mcuos.com@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/