rtc: replace remaining __FUNCTION__ occurrences
authorHarvey Harrison <harvey.harrison@gmail.com>
Mon, 28 Apr 2008 09:12:00 +0000 (02:12 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 28 Apr 2008 15:58:17 +0000 (08:58 -0700)
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: David Brownell <david-b@pacbell.net>
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>
13 files changed:
drivers/rtc/rtc-at91rm9200.c
drivers/rtc/rtc-at91sam9.c
drivers/rtc/rtc-ds1302.c
drivers/rtc/rtc-ds1672.c
drivers/rtc/rtc-max6900.c
drivers/rtc/rtc-max6902.c
drivers/rtc/rtc-pcf8563.c
drivers/rtc/rtc-rs5c313.c
drivers/rtc/rtc-rs5c372.c
drivers/rtc/rtc-s3c.c
drivers/rtc/rtc-sh.c
drivers/rtc/rtc-v3020.c
drivers/rtc/rtc-x1205.c

index 52abffc86bcd0a2d24fcbadbe47185007752f19a..39e64ab1ecb71b139c336fae6ba4bb637ea61ffb 100644 (file)
@@ -83,7 +83,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 +97,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 +142,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 +178,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 +193,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 +265,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;
index 56728a2a3385f84b8ac9dffe35f9501066a58a7a..38d8742a4bdfb4554649cfa37496ebd66a3e027c 100644 (file)
@@ -288,7 +288,7 @@ static irqreturn_t at91_rtc_interrupt(int irq, void *_rtc)
 
        rtc_update_irq(rtc->rtcdev, 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;
index 7b002ceeaa7dab6a6d8336b601cbc20e8d888566..b9397818f73a6fd22b118a5643fd768a15b4d5ee 100644 (file)
@@ -122,7 +122,7 @@ static int ds1302_rtc_read_time(struct device *dev, struct rtc_time *tm)
 
        dev_dbg(dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
                "mday=%d, mon=%d, year=%d, wday=%d\n",
-               __FUNCTION__,
+               __func__,
                tm->tm_sec, tm->tm_min, tm->tm_hour,
                tm->tm_mday, tm->tm_mon + 1, tm->tm_year, tm->tm_wday);
 
index e0900ca678ecc54ad7c50276d3cc4a580dcf2c40..6fa4556f5f5c06b4d469e4a8c553d0d47357ebe0 100644 (file)
@@ -50,13 +50,13 @@ static int ds1672_get_datetime(struct i2c_client *client, struct rtc_time *tm)
 
        /* read date registers */
        if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) {
-               dev_err(&client->dev, "%s: read error\n", __FUNCTION__);
+               dev_err(&client->dev, "%s: read error\n", __func__);
                return -EIO;
        }
 
        dev_dbg(&client->dev,
                "%s: raw read data - counters=%02x,%02x,%02x,%02x\n",
-               __FUNCTION__, buf[0], buf[1], buf[2], buf[3]);
+               __func__, buf[0], buf[1], buf[2], buf[3]);
 
        time = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
 
@@ -64,7 +64,7 @@ static int ds1672_get_datetime(struct i2c_client *client, struct rtc_time *tm)
 
        dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
                "mday=%d, mon=%d, year=%d, wday=%d\n",
-               __FUNCTION__, tm->tm_sec, tm->tm_min, tm->tm_hour,
+               __func__, tm->tm_sec, tm->tm_min, tm->tm_hour,
                tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
 
        return 0;
@@ -84,7 +84,7 @@ static int ds1672_set_mmss(struct i2c_client *client, unsigned long secs)
 
        xfer = i2c_master_send(client, buf, 6);
        if (xfer != 6) {
-               dev_err(&client->dev, "%s: send: %d\n", __FUNCTION__, xfer);
+               dev_err(&client->dev, "%s: send: %d\n", __func__, xfer);
                return -EIO;
        }
 
@@ -98,7 +98,7 @@ static int ds1672_set_datetime(struct i2c_client *client, struct rtc_time *tm)
        dev_dbg(&client->dev,
                "%s: secs=%d, mins=%d, hours=%d, "
                "mday=%d, mon=%d, year=%d, wday=%d\n",
-               __FUNCTION__,
+               __func__,
                tm->tm_sec, tm->tm_min, tm->tm_hour,
                tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
 
@@ -133,7 +133,7 @@ static int ds1672_get_control(struct i2c_client *client, u8 *status)
 
        /* read control register */
        if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) {
-               dev_err(&client->dev, "%s: read error\n", __FUNCTION__);
+               dev_err(&client->dev, "%s: read error\n", __func__);
                return -EIO;
        }
 
@@ -199,7 +199,7 @@ static int ds1672_probe(struct i2c_adapter *adapter, int address, int kind)
        struct i2c_client *client;
        struct rtc_device *rtc;
 
-       dev_dbg(&adapter->dev, "%s\n", __FUNCTION__);
+       dev_dbg(&adapter->dev, "%s\n", __func__);
 
        if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) {
                err = -ENODEV;
index 7683412970c4d234d9abe2bc323f020a17f111c0..ded3c0abad835736152c093d9ae5dc0402afec58 100644 (file)
@@ -98,7 +98,7 @@ static int max6900_i2c_read_regs(struct i2c_client *client, u8 *buf)
        rc = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs));
        if (rc != ARRAY_SIZE(msgs)) {
                dev_err(&client->dev, "%s: register read failed\n",
-                       __FUNCTION__);
+                       __func__);
                return -EIO;
        }
        return 0;
@@ -150,7 +150,7 @@ static int max6900_i2c_write_regs(struct i2c_client *client, u8 const *buf)
 
 write_failed:
        dev_err(&client->dev, "%s: register write failed\n",
-               __FUNCTION__);
+               __func__);
        return -EIO;
 }
 
@@ -214,7 +214,7 @@ static int max6900_i2c_clear_write_protect(struct i2c_client *client)
        rc = i2c_smbus_write_byte_data (client, MAX6900_REG_CONTROL_WRITE, 0);
        if (rc < 0) {
                dev_err(&client->dev, "%s: control register write failed\n",
-                       __FUNCTION__);
+                       __func__);
                return -EIO;
        }
        return 0;
index 1f956dc5d56eeb57806bb66b471422ae5734ad37..12f0310ae89c661621c6d9db3c993db084adacd6 100644 (file)
@@ -140,7 +140,7 @@ static int max6902_get_datetime(struct device *dev, struct rtc_time *dt)
        dt->tm_year -= 1900;
 
 #ifdef MAX6902_DEBUG
-       printk("\n%s : Read RTC values\n",__FUNCTION__);
+       printk("\n%s : Read RTC values\n",__func__);
        printk("tm_hour: %i\n",dt->tm_hour);
        printk("tm_min : %i\n",dt->tm_min);
        printk("tm_sec : %i\n",dt->tm_sec);
@@ -158,7 +158,7 @@ static int max6902_set_datetime(struct device *dev, struct rtc_time *dt)
        dt->tm_year = dt->tm_year+1900;
 
 #ifdef MAX6902_DEBUG
-       printk("\n%s : Setting RTC values\n",__FUNCTION__);
+       printk("\n%s : Setting RTC values\n",__func__);
        printk("tm_sec : %i\n",dt->tm_sec);
        printk("tm_min : %i\n",dt->tm_min);
        printk("tm_hour: %i\n",dt->tm_hour);
index a1e2f39521f81c22ee3fe6750f504d98b4823b66..a41681d26eba80ae58df5b0090ae603fbab519fe 100644 (file)
@@ -80,7 +80,7 @@ static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm)
 
        /* read registers */
        if ((i2c_transfer(client->adapter, msgs, 2)) != 2) {
-               dev_err(&client->dev, "%s: read error\n", __FUNCTION__);
+               dev_err(&client->dev, "%s: read error\n", __func__);
                return -EIO;
        }
 
@@ -91,7 +91,7 @@ static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm)
        dev_dbg(&client->dev,
                "%s: raw data is st1=%02x, st2=%02x, sec=%02x, min=%02x, hr=%02x, "
                "mday=%02x, wday=%02x, mon=%02x, year=%02x\n",
-               __FUNCTION__,
+               __func__,
                buf[0], buf[1], buf[2], buf[3],
                buf[4], buf[5], buf[6], buf[7],
                buf[8]);
@@ -112,7 +112,7 @@ static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm)
 
        dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
                "mday=%d, mon=%d, year=%d, wday=%d\n",
-               __FUNCTION__,
+               __func__,
                tm->tm_sec, tm->tm_min, tm->tm_hour,
                tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
 
@@ -133,7 +133,7 @@ static int pcf8563_set_datetime(struct i2c_client *client, struct rtc_time *tm)
 
        dev_dbg(&client->dev, "%s: secs=%d, mins=%d, hours=%d, "
                "mday=%d, mon=%d, year=%d, wday=%d\n",
-               __FUNCTION__,
+               __func__,
                tm->tm_sec, tm->tm_min, tm->tm_hour,
                tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
 
@@ -163,7 +163,7 @@ static int pcf8563_set_datetime(struct i2c_client *client, struct rtc_time *tm)
                if (err != sizeof(data)) {
                        dev_err(&client->dev,
                                "%s: err=%d addr=%02x, data=%02x\n",
-                               __FUNCTION__, err, data[0], data[1]);
+                               __func__, err, data[0], data[1]);
                        return -EIO;
                }
        };
@@ -208,7 +208,7 @@ static int pcf8563_validate_client(struct i2c_client *client)
                if (xfer != ARRAY_SIZE(msgs)) {
                        dev_err(&client->dev,
                                "%s: could not read register 0x%02X\n",
-                               __FUNCTION__, pattern[i].reg);
+                               __func__, pattern[i].reg);
 
                        return -EIO;
                }
@@ -220,7 +220,7 @@ static int pcf8563_validate_client(struct i2c_client *client)
                        dev_dbg(&client->dev,
                                "%s: pattern=%d, reg=%x, mask=0x%02x, min=%d, "
                                "max=%d, value=%d, raw=0x%02X\n",
-                               __FUNCTION__, i, pattern[i].reg, pattern[i].mask,
+                               __func__, i, pattern[i].reg, pattern[i].mask,
                                pattern[i].min, pattern[i].max,
                                value, buf);
 
index 664e89a817eddbce2baeff7aa07ebbf792a5bf70..1c14d4497c4db8bffc37148b138e8b17070eaf28 100644 (file)
@@ -228,7 +228,7 @@ static int rs5c313_rtc_read_time(struct device *dev, struct rtc_time *tm)
                ndelay(700);    /* CE:L */
 
                if (cnt++ > 100) {
-                       dev_err(dev, "%s: timeout error\n", __FUNCTION__);
+                       dev_err(dev, "%s: timeout error\n", __func__);
                        return -EIO;
                }
        }
@@ -289,7 +289,7 @@ static int rs5c313_rtc_set_time(struct device *dev, struct rtc_time *tm)
                ndelay(700);    /* CE:L */
 
                if (cnt++ > 100) {
-                       dev_err(dev, "%s: timeout error\n", __FUNCTION__);
+                       dev_err(dev, "%s: timeout error\n", __func__);
                        return -EIO;
                }
        }
index 67d8768c1b64a7a8ab11f80c7a6fa6927f08c7f3..7e63074708ebffa060c1f2b5b405ac37790323b5 100644 (file)
@@ -166,7 +166,7 @@ static int rs5c372_get_datetime(struct i2c_client *client, struct rtc_time *tm)
 
        dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
                "mday=%d, mon=%d, year=%d, wday=%d\n",
-               __FUNCTION__,
+               __func__,
                tm->tm_sec, tm->tm_min, tm->tm_hour,
                tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
 
@@ -181,7 +181,7 @@ static int rs5c372_set_datetime(struct i2c_client *client, struct rtc_time *tm)
 
        dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d "
                "mday=%d, mon=%d, year=%d, wday=%d\n",
-               __FUNCTION__,
+               __func__,
                tm->tm_sec, tm->tm_min, tm->tm_hour,
                tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
 
@@ -195,7 +195,7 @@ static int rs5c372_set_datetime(struct i2c_client *client, struct rtc_time *tm)
        buf[7] = BIN2BCD(tm->tm_year - 100);
 
        if ((i2c_master_send(client, buf, 8)) != 8) {
-               dev_err(&client->dev, "%s: write error\n", __FUNCTION__);
+               dev_err(&client->dev, "%s: write error\n", __func__);
                return -EIO;
        }
 
@@ -220,7 +220,7 @@ static int rs5c372_get_trim(struct i2c_client *client, int *osc, int *trim)
                *osc = (tmp & RS5C372_TRIM_XSL) ? 32000 : 32768;
 
        if (trim) {
-               dev_dbg(&client->dev, "%s: raw trim=%x\n", __FUNCTION__, tmp);
+               dev_dbg(&client->dev, "%s: raw trim=%x\n", __func__, tmp);
                tmp &= RS5C372_TRIM_MASK;
                if (tmp & 0x3e) {
                        int t = tmp & 0x3f;
@@ -500,7 +500,7 @@ static int rs5c372_probe(struct i2c_client *client)
        struct rs5c372 *rs5c372;
        struct rtc_time tm;
 
-       dev_dbg(&client->dev, "%s\n", __FUNCTION__);
+       dev_dbg(&client->dev, "%s\n", __func__);
 
        if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
                err = -ENODEV;
index 9f4d5129a496a445bce3ae90c89bfc9e0746f875..f26e0cad8f167c5221fd5a480c42e7f2fcdb2baa 100644 (file)
@@ -68,7 +68,7 @@ static void s3c_rtc_setaie(int to)
 {
        unsigned int tmp;
 
-       pr_debug("%s: aie=%d\n", __FUNCTION__, to);
+       pr_debug("%s: aie=%d\n", __func__, to);
 
        tmp = readb(s3c_rtc_base + S3C2410_RTCALM) & ~S3C2410_RTCALM_ALMEN;
 
@@ -82,7 +82,7 @@ static void s3c_rtc_setpie(int to)
 {
        unsigned int tmp;
 
-       pr_debug("%s: pie=%d\n", __FUNCTION__, to);
+       pr_debug("%s: pie=%d\n", __func__, to);
 
        spin_lock_irq(&s3c_rtc_pie_lock);
        tmp = readb(s3c_rtc_base + S3C2410_TICNT) & ~S3C2410_TICNT_ENABLE;
@@ -457,7 +457,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
        struct resource *res;
        int ret;
 
-       pr_debug("%s: probe=%p\n", __FUNCTION__, pdev);
+       pr_debug("%s: probe=%p\n", __func__, pdev);
 
        /* find the IRQs */
 
index c594b34c67679e3f1d7df1ba143854217bc38455..110699bb478751ac619b1e0a6869059dc99318a8 100644 (file)
@@ -361,7 +361,7 @@ static int sh_rtc_read_time(struct device *dev, struct rtc_time *tm)
 
        dev_dbg(dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
                "mday=%d, mon=%d, year=%d, wday=%d\n",
-               __FUNCTION__,
+               __func__,
                tm->tm_sec, tm->tm_min, tm->tm_hour,
                tm->tm_mday, tm->tm_mon + 1, tm->tm_year, tm->tm_wday);
 
index 24203a06051a98f2e1d4a8110129d454f5e8690a..10025d84026812e0eab2fe1f3fa5179e411b2aca 100644 (file)
@@ -107,7 +107,7 @@ static int v3020_read_time(struct device *dev, struct rtc_time *dt)
        dt->tm_year = BCD2BIN(tmp)+100;
 
 #ifdef DEBUG
-       printk("\n%s : Read RTC values\n",__FUNCTION__);
+       printk("\n%s : Read RTC values\n",__func__);
        printk("tm_hour: %i\n",dt->tm_hour);
        printk("tm_min : %i\n",dt->tm_min);
        printk("tm_sec : %i\n",dt->tm_sec);
@@ -126,7 +126,7 @@ static int v3020_set_time(struct device *dev, struct rtc_time *dt)
        struct v3020 *chip = dev_get_drvdata(dev);
 
 #ifdef DEBUG
-       printk("\n%s : Setting RTC values\n",__FUNCTION__);
+       printk("\n%s : Setting RTC values\n",__func__);
        printk("tm_sec : %i\n",dt->tm_sec);
        printk("tm_min : %i\n",dt->tm_min);
        printk("tm_hour: %i\n",dt->tm_hour);
index bb3290360091577f2885c5298b11c9fd386876d7..095282f635236b106b9eb3b51b7a354f39b813ac 100644 (file)
@@ -99,14 +99,14 @@ static int x1205_get_datetime(struct i2c_client *client, struct rtc_time *tm,
 
        /* read date registers */
        if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) {
-               dev_err(&client->dev, "%s: read error\n", __FUNCTION__);
+               dev_err(&client->dev, "%s: read error\n", __func__);
                return -EIO;
        }
 
        dev_dbg(&client->dev,
                "%s: raw read data - sec=%02x, min=%02x, hr=%02x, "
                "mday=%02x, mon=%02x, year=%02x, wday=%02x, y2k=%02x\n",
-               __FUNCTION__,
+               __func__,
                buf[0], buf[1], buf[2], buf[3],
                buf[4], buf[5], buf[6], buf[7]);
 
@@ -121,7 +121,7 @@ static int x1205_get_datetime(struct i2c_client *client, struct rtc_time *tm,
 
        dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
                "mday=%d, mon=%d, year=%d, wday=%d\n",
-               __FUNCTION__,
+               __func__,
                tm->tm_sec, tm->tm_min, tm->tm_hour,
                tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
 
@@ -139,7 +139,7 @@ static int x1205_get_status(struct i2c_client *client, unsigned char *sr)
 
        /* read status register */
        if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) {
-               dev_err(&client->dev, "%s: read error\n", __FUNCTION__);
+               dev_err(&client->dev, "%s: read error\n", __func__);
                return -EIO;
        }
 
@@ -162,7 +162,7 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm,
 
        dev_dbg(&client->dev,
                "%s: secs=%d, mins=%d, hours=%d\n",
-               __FUNCTION__,
+               __func__,
                tm->tm_sec, tm->tm_min, tm->tm_hour);
 
        buf[CCR_SEC] = BIN2BCD(tm->tm_sec);
@@ -175,7 +175,7 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm,
        if (datetoo) {
                dev_dbg(&client->dev,
                        "%s: mday=%d, mon=%d, year=%d, wday=%d\n",
-                       __FUNCTION__,
+                       __func__,
                        tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
 
                buf[CCR_MDAY] = BIN2BCD(tm->tm_mday);
@@ -191,12 +191,12 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm,
 
        /* this sequence is required to unlock the chip */
        if ((xfer = i2c_master_send(client, wel, 3)) != 3) {
-               dev_err(&client->dev, "%s: wel - %d\n", __FUNCTION__, xfer);
+               dev_err(&client->dev, "%s: wel - %d\n", __func__, xfer);
                return -EIO;
        }
 
        if ((xfer = i2c_master_send(client, rwel, 3)) != 3) {
-               dev_err(&client->dev, "%s: rwel - %d\n", __FUNCTION__, xfer);
+               dev_err(&client->dev, "%s: rwel - %d\n", __func__, xfer);
                return -EIO;
        }
 
@@ -208,7 +208,7 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm,
                if (xfer != 3) {
                        dev_err(&client->dev,
                                "%s: xfer=%d addr=%02x, data=%02x\n",
-                               __FUNCTION__,
+                               __func__,
                                 xfer, rdata[1], rdata[2]);
                        return -EIO;
                }
@@ -216,7 +216,7 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm,
 
        /* disable further writes */
        if ((xfer = i2c_master_send(client, diswe, 3)) != 3) {
-               dev_err(&client->dev, "%s: diswe - %d\n", __FUNCTION__, xfer);
+               dev_err(&client->dev, "%s: diswe - %d\n", __func__, xfer);
                return -EIO;
        }
 
@@ -249,11 +249,11 @@ static int x1205_get_dtrim(struct i2c_client *client, int *trim)
 
        /* read dtr register */
        if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) {
-               dev_err(&client->dev, "%s: read error\n", __FUNCTION__);
+               dev_err(&client->dev, "%s: read error\n", __func__);
                return -EIO;
        }
 
-       dev_dbg(&client->dev, "%s: raw dtr=%x\n", __FUNCTION__, dtr);
+       dev_dbg(&client->dev, "%s: raw dtr=%x\n", __func__, dtr);
 
        *trim = 0;
 
@@ -281,11 +281,11 @@ static int x1205_get_atrim(struct i2c_client *client, int *trim)
 
        /* read atr register */
        if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) {
-               dev_err(&client->dev, "%s: read error\n", __FUNCTION__);
+               dev_err(&client->dev, "%s: read error\n", __func__);
                return -EIO;
        }
 
-       dev_dbg(&client->dev, "%s: raw atr=%x\n", __FUNCTION__, atr);
+       dev_dbg(&client->dev, "%s: raw atr=%x\n", __func__, atr);
 
        /* atr is a two's complement value on 6 bits,
         * perform sign extension. The formula is
@@ -294,11 +294,11 @@ static int x1205_get_atrim(struct i2c_client *client, int *trim)
        if (atr & 0x20)
                atr |= 0xC0;
 
-       dev_dbg(&client->dev, "%s: raw atr=%x (%d)\n", __FUNCTION__, atr, atr);
+       dev_dbg(&client->dev, "%s: raw atr=%x (%d)\n", __func__, atr, atr);
 
        *trim = (atr * 250) + 11000;
 
-       dev_dbg(&client->dev, "%s: real=%d\n", __FUNCTION__, *trim);
+       dev_dbg(&client->dev, "%s: real=%d\n", __func__, *trim);
 
        return 0;
 }
@@ -352,7 +352,7 @@ static int x1205_validate_client(struct i2c_client *client)
                if ((xfer = i2c_transfer(client->adapter, msgs, 2)) != 2) {
                        dev_err(&client->dev,
                                "%s: could not read register %x\n",
-                               __FUNCTION__, probe_zero_pattern[i]);
+                               __func__, probe_zero_pattern[i]);
 
                        return -EIO;
                }
@@ -360,7 +360,7 @@ static int x1205_validate_client(struct i2c_client *client)
                if ((buf & probe_zero_pattern[i+1]) != 0) {
                        dev_err(&client->dev,
                                "%s: register=%02x, zero pattern=%d, value=%x\n",
-                               __FUNCTION__, probe_zero_pattern[i], i, buf);
+                               __func__, probe_zero_pattern[i], i, buf);
 
                        return -ENODEV;
                }
@@ -380,7 +380,7 @@ static int x1205_validate_client(struct i2c_client *client)
                if ((xfer = i2c_transfer(client->adapter, msgs, 2)) != 2) {
                        dev_err(&client->dev,
                                "%s: could not read register %x\n",
-                               __FUNCTION__, probe_limits_pattern[i].reg);
+                               __func__, probe_limits_pattern[i].reg);
 
                        return -EIO;
                }
@@ -391,7 +391,7 @@ static int x1205_validate_client(struct i2c_client *client)
                        value < probe_limits_pattern[i].min) {
                        dev_dbg(&client->dev,
                                "%s: register=%x, lim pattern=%d, value=%d\n",
-                               __FUNCTION__, probe_limits_pattern[i].reg,
+                               __func__, probe_limits_pattern[i].reg,
                                i, value);
 
                        return -ENODEV;