Skip to content

Commit

Permalink
rtc: replace remaining __FUNCTION__ occurrences
Browse files Browse the repository at this point in the history
__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>
  • Loading branch information
hharrison authored and torvalds committed Apr 28, 2008
1 parent dca03a5 commit 2a4e2b8
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 60 deletions.
12 changes: 6 additions & 6 deletions drivers/rtc/rtc-at91rm9200.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand All @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-at91sam9.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-ds1302.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
14 changes: 7 additions & 7 deletions drivers/rtc/rtc-ds1672.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@ 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];

rtc_time_to_tm(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;
Expand All @@ -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;
}

Expand All @@ -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);

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions drivers/rtc/rtc-max6900.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions drivers/rtc/rtc-max6902.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
14 changes: 7 additions & 7 deletions drivers/rtc/rtc-pcf8563.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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]);
Expand All @@ -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);

Expand All @@ -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);

Expand Down Expand Up @@ -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;
}
};
Expand Down Expand Up @@ -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;
}
Expand All @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions drivers/rtc/rtc-rs5c313.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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;
}
}
Expand Down
10 changes: 5 additions & 5 deletions drivers/rtc/rtc-rs5c372.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);

Expand All @@ -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;
}

Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions drivers/rtc/rtc-s3c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down Expand Up @@ -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 */

Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-sh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions drivers/rtc/rtc-v3020.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
Loading

0 comments on commit 2a4e2b8

Please sign in to comment.