Skip to content

Commit

Permalink
drivers/rtc/rtc-pl03x.c: remove unnecessary amba_set_drvdata()
Browse files Browse the repository at this point in the history
Driver core clears the driver data to NULL after device_release or on
probe failure, so just remove it from here.

The relevant driver core change was commit 0998d06 ("device-core:
Ensure drvdata = NULL when no driver is bound").

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Michal Simek authored and Linus Torvalds committed Nov 13, 2013
1 parent c8b18da commit a272606
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions drivers/rtc/rtc-pl030.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ static int pl030_remove(struct amba_device *dev)
{
struct pl030_rtc *rtc = amba_get_drvdata(dev);

amba_set_drvdata(dev, NULL);

writel(0, rtc->base + RTC_CR);

free_irq(dev->irq[0], rtc);
Expand Down
2 changes: 0 additions & 2 deletions drivers/rtc/rtc-pl031.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ static int pl031_remove(struct amba_device *adev)
{
struct pl031_local *ldata = dev_get_drvdata(&adev->dev);

amba_set_drvdata(adev, NULL);
free_irq(adev->irq[0], ldata);
rtc_device_unregister(ldata->rtc);
iounmap(ldata->base);
Expand Down Expand Up @@ -391,7 +390,6 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
rtc_device_unregister(ldata->rtc);
out_no_rtc:
iounmap(ldata->base);
amba_set_drvdata(adev, NULL);
out_no_remap:
kfree(ldata);
out:
Expand Down

0 comments on commit a272606

Please sign in to comment.