rtc: treewide: remove excess rtc_device validation
authorAlexander Shiyan <shc_work@mail.ru>
Thu, 3 Apr 2014 21:50:20 +0000 (14:50 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Apr 2014 23:21:24 +0000 (16:21 -0700)
The patch "rtc: verify a critical argument to rtc_update_irq() before
using it" introduces validation for rtc_device in the RTC core, so there
are no need to check this argument for rtc_update_irq() from the
drivers.

This patch removes such check for the existing rtc_update_irq() users.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
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>
drivers/rtc/rtc-ds1511.c
drivers/rtc/rtc-ds1553.c
drivers/rtc/rtc-stk17ta8.c
drivers/rtc/rtc-tx4939.c

index 4ff20f9dc212c62785b320d6791f1d6d2dc259e6..b13d1399b81a356a63bb11c613420dbf2fcccdad 100644 (file)
@@ -371,8 +371,7 @@ ds1511_interrupt(int irq, void *dev_id)
                        events |= RTC_UF;
                else
                        events |= RTC_AF;
-               if (likely(pdata->rtc))
-                       rtc_update_irq(pdata->rtc, 1, events);
+               rtc_update_irq(pdata->rtc, 1, events);
        }
        spin_unlock(&pdata->lock);
        return events ? IRQ_HANDLED : IRQ_NONE;
index 9ac2fa07dffa1ee3105e83716ea1b5c3e0632eeb..ab56893aac73aa58ec0d475d26c6da7f01d4c514 100644 (file)
@@ -206,8 +206,7 @@ static irqreturn_t ds1553_rtc_interrupt(int irq, void *dev_id)
                        events |= RTC_UF;
                else
                        events |= RTC_AF;
-               if (likely(pdata->rtc))
-                       rtc_update_irq(pdata->rtc, 1, events);
+               rtc_update_irq(pdata->rtc, 1, events);
        }
        spin_unlock(&pdata->lock);
        return events ? IRQ_HANDLED : IRQ_NONE;
index a176ba6146837bd7c21ba901ce249e988d85abc2..35ed49ea1f81890c2ffc204e435410ffb5a176eb 100644 (file)
@@ -214,8 +214,7 @@ static irqreturn_t stk17ta8_rtc_interrupt(int irq, void *dev_id)
                        events |= RTC_UF;
                else
                        events |= RTC_AF;
-               if (likely(pdata->rtc))
-                       rtc_update_irq(pdata->rtc, 1, events);
+               rtc_update_irq(pdata->rtc, 1, events);
        }
        spin_unlock(&pdata->lock);
        return events ? IRQ_HANDLED : IRQ_NONE;
index 4f87234e0dee0a6f8daf84e7fd94c6b9d517bfee..2e678c681b1304cb15459d011846fa79ab596d94 100644 (file)
@@ -176,8 +176,8 @@ static irqreturn_t tx4939_rtc_interrupt(int irq, void *dev_id)
                tx4939_rtc_cmd(rtcreg, TX4939_RTCCTL_COMMAND_NOP);
        }
        spin_unlock(&pdata->lock);
-       if (likely(pdata->rtc))
-               rtc_update_irq(pdata->rtc, 1, events);
+       rtc_update_irq(pdata->rtc, 1, events);
+
        return IRQ_HANDLED;
 }