Skip to content

Commit

Permalink
drivers/rtc/rtc-ab3100.c: add missing platform_set_drvdata() in ab310…
Browse files Browse the repository at this point in the history
…0_rtc_probe()

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

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by:Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Axel Lin authored and Linus Torvalds committed Sep 23, 2010
1 parent f566551 commit eba93fc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/rtc/rtc-ab3100.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}

Expand Down

0 comments on commit eba93fc

Please sign in to comment.