]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/rtc/rtc-pl03x.c: remove unnecessary amba_set_drvdata()
authorMichal Simek <michal.simek@xilinx.com>
Tue, 5 Nov 2013 05:57:24 +0000 (16:57 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 5 Nov 2013 05:57:24 +0000 (16:57 +1100)
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 0998d063100128 ("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>
drivers/rtc/rtc-pl030.c
drivers/rtc/rtc-pl031.c

index 22bacdbf9139dce42e82754ec9de7c061dea755e..a804f758ac6dd9684c14b1a1fd44219c2b3325e1 100644 (file)
@@ -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);
index 0f0609b1aa2ccfead83ec98db660a58fac5736de..c9ca86eea96f804eea71fe99de66bbc85f6a8614 100644 (file)
@@ -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);
@@ -392,7 +391,6 @@ out_no_irq:
        rtc_device_unregister(ldata->rtc);
 out_no_rtc:
        iounmap(ldata->base);
-       amba_set_drvdata(adev, NULL);
 out_no_remap:
        kfree(ldata);
 out: