From: Michal Simek Date: Tue, 12 Nov 2013 23:11:00 +0000 (-0800) Subject: drivers/rtc/rtc-pl03x.c: remove unnecessary amba_set_drvdata() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a2726061920f43f594e03236d694c71f77adc6a2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drivers/rtc/rtc-pl03x.c: remove unnecessary amba_set_drvdata() 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 0998d0631001 ("device-core: Ensure drvdata = NULL when no driver is bound"). Signed-off-by: Michal Simek Cc: Linus Walleij Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/rtc/rtc-pl030.c b/drivers/rtc/rtc-pl030.c index 22bacdbf9139..a804f758ac6d 100644 --- a/drivers/rtc/rtc-pl030.c +++ b/drivers/rtc/rtc-pl030.c @@ -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); diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c index e3b25712b659..99181fff88fd 100644 --- a/drivers/rtc/rtc-pl031.c +++ b/drivers/rtc/rtc-pl031.c @@ -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); @@ -391,7 +390,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: