OSDN Git Service

rtc: ds1511: allow waking platform
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Thu, 12 Oct 2017 22:05:28 +0000 (00:05 +0200)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Thu, 12 Oct 2017 22:10:15 +0000 (00:10 +0200)
Disabling interrupts when removing the driver is bad practice as this will
prevent some platform from waking up when using that RTC.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-ds1511.c

index d446351..eda4535 100644 (file)
@@ -511,16 +511,8 @@ static int ds1511_rtc_probe(struct platform_device *pdev)
 
 static int ds1511_rtc_remove(struct platform_device *pdev)
 {
-       struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
-
        sysfs_remove_bin_file(&pdev->dev.kobj, &ds1511_nvram_attr);
-       if (pdata->irq > 0) {
-               /*
-                * disable the alarm interrupt
-                */
-               rtc_write(rtc_read(RTC_CMD) & ~RTC_TIE, RTC_CMD);
-               rtc_read(RTC_CMD1);
-       }
+
        return 0;
 }