]> err.no Git - linux-2.6/blobdiff - drivers/rtc/rtc-at91rm9200.c
rtc: convert the PCF8583 driver to the new I2C style framework with device_ids
[linux-2.6] / drivers / rtc / rtc-at91rm9200.c
index 52abffc86bcd0a2d24fcbadbe47185007752f19a..9c3db934cc247b6d68859b3869980feeefd92936 100644 (file)
 #include <linux/completion.h>
 
 #include <asm/uaccess.h>
-#include <asm/rtc.h>
-
-#include <asm/mach/time.h>
-
 #include <asm/arch/at91_rtc.h>
 
 
@@ -83,7 +79,7 @@ static int at91_rtc_readtime(struct device *dev, struct rtc_time *tm)
        tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, tm->tm_year);
        tm->tm_year = tm->tm_year - 1900;
 
-       pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __FUNCTION__,
+       pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __func__,
                1900 + tm->tm_year, tm->tm_mon, tm->tm_mday,
                tm->tm_hour, tm->tm_min, tm->tm_sec);
 
@@ -97,7 +93,7 @@ static int at91_rtc_settime(struct device *dev, struct rtc_time *tm)
 {
        unsigned long cr;
 
-       pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __FUNCTION__,
+       pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __func__,
                1900 + tm->tm_year, tm->tm_mon, tm->tm_mday,
                tm->tm_hour, tm->tm_min, tm->tm_sec);
 
@@ -142,7 +138,7 @@ static int at91_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm)
        alrm->enabled = (at91_sys_read(AT91_RTC_IMR) & AT91_RTC_ALARM)
                        ? 1 : 0;
 
-       pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __FUNCTION__,
+       pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __func__,
                1900 + tm->tm_year, tm->tm_mon, tm->tm_mday,
                tm->tm_hour, tm->tm_min, tm->tm_sec);
 
@@ -178,7 +174,7 @@ static int at91_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
        if (alrm->enabled)
                at91_sys_write(AT91_RTC_IER, AT91_RTC_ALARM);
 
-       pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __FUNCTION__,
+       pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __func__,
                at91_alarm_year, tm.tm_mon, tm.tm_mday, tm.tm_hour,
                tm.tm_min, tm.tm_sec);
 
@@ -193,7 +189,7 @@ static int at91_rtc_ioctl(struct device *dev, unsigned int cmd,
 {
        int ret = 0;
 
-       pr_debug("%s(): cmd=%08x, arg=%08lx.\n", __FUNCTION__, cmd, arg);
+       pr_debug("%s(): cmd=%08x, arg=%08lx.\n", __func__, cmd, arg);
 
        switch (cmd) {
        case RTC_AIE_OFF:       /* alarm off */
@@ -265,7 +261,7 @@ static irqreturn_t at91_rtc_interrupt(int irq, void *dev_id)
 
                rtc_update_irq(rtc, 1, events);
 
-               pr_debug("%s(): num=%ld, events=0x%02lx\n", __FUNCTION__,
+               pr_debug("%s(): num=%ld, events=0x%02lx\n", __func__,
                        events >> 8, events & 0x000000FF);
 
                return IRQ_HANDLED;