Commit 2a4e2b87 authored by Harvey Harrison's avatar Harvey Harrison Committed by Linus Torvalds

rtc: replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent dca03a51
...@@ -83,7 +83,7 @@ static int at91_rtc_readtime(struct device *dev, struct rtc_time *tm) ...@@ -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_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, tm->tm_year);
tm->tm_year = tm->tm_year - 1900; 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, 1900 + tm->tm_year, tm->tm_mon, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec); 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) ...@@ -97,7 +97,7 @@ static int at91_rtc_settime(struct device *dev, struct rtc_time *tm)
{ {
unsigned long cr; 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, 1900 + tm->tm_year, tm->tm_mon, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec); 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) ...@@ -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) alrm->enabled = (at91_sys_read(AT91_RTC_IMR) & AT91_RTC_ALARM)
? 1 : 0; ? 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, 1900 + tm->tm_year, tm->tm_mon, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec); 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) ...@@ -178,7 +178,7 @@ static int at91_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
if (alrm->enabled) if (alrm->enabled)
at91_sys_write(AT91_RTC_IER, AT91_RTC_ALARM); 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, at91_alarm_year, tm.tm_mon, tm.tm_mday, tm.tm_hour,
tm.tm_min, tm.tm_sec); tm.tm_min, tm.tm_sec);
...@@ -193,7 +193,7 @@ static int at91_rtc_ioctl(struct device *dev, unsigned int cmd, ...@@ -193,7 +193,7 @@ static int at91_rtc_ioctl(struct device *dev, unsigned int cmd,
{ {
int ret = 0; 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) { switch (cmd) {
case RTC_AIE_OFF: /* alarm off */ case RTC_AIE_OFF: /* alarm off */
...@@ -265,7 +265,7 @@ static irqreturn_t at91_rtc_interrupt(int irq, void *dev_id) ...@@ -265,7 +265,7 @@ static irqreturn_t at91_rtc_interrupt(int irq, void *dev_id)
rtc_update_irq(rtc, 1, events); 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); events >> 8, events & 0x000000FF);
return IRQ_HANDLED; return IRQ_HANDLED;
......
...@@ -288,7 +288,7 @@ static irqreturn_t at91_rtc_interrupt(int irq, void *_rtc) ...@@ -288,7 +288,7 @@ static irqreturn_t at91_rtc_interrupt(int irq, void *_rtc)
rtc_update_irq(rtc->rtcdev, 1, events); 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); events >> 8, events & 0x000000FF);
return IRQ_HANDLED; return IRQ_HANDLED;
......
...@@ -122,7 +122,7 @@ static int ds1302_rtc_read_time(struct device *dev, struct rtc_time *tm) ...@@ -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, " dev_dbg(dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
"mday=%d, mon=%d, year=%d, wday=%d\n", "mday=%d, mon=%d, year=%d, wday=%d\n",
__FUNCTION__, __func__,
tm->tm_sec, tm->tm_min, tm->tm_hour, tm->tm_sec, tm->tm_min, tm->tm_hour,
tm->tm_mday, tm->tm_mon + 1, tm->tm_year, tm->tm_wday); tm->tm_mday, tm->tm_mon + 1, tm->tm_year, tm->tm_wday);
......
...@@ -50,13 +50,13 @@ static int ds1672_get_datetime(struct i2c_client *client, struct rtc_time *tm) ...@@ -50,13 +50,13 @@ static int ds1672_get_datetime(struct i2c_client *client, struct rtc_time *tm)
/* read date registers */ /* read date registers */
if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) { 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; return -EIO;
} }
dev_dbg(&client->dev, dev_dbg(&client->dev,
"%s: raw read data - counters=%02x,%02x,%02x,%02x\n", "%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]; 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) ...@@ -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, " dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
"mday=%d, mon=%d, year=%d, wday=%d\n", "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); tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
return 0; return 0;
...@@ -84,7 +84,7 @@ static int ds1672_set_mmss(struct i2c_client *client, unsigned long secs) ...@@ -84,7 +84,7 @@ static int ds1672_set_mmss(struct i2c_client *client, unsigned long secs)
xfer = i2c_master_send(client, buf, 6); xfer = i2c_master_send(client, buf, 6);
if (xfer != 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; return -EIO;
} }
...@@ -98,7 +98,7 @@ static int ds1672_set_datetime(struct i2c_client *client, struct rtc_time *tm) ...@@ -98,7 +98,7 @@ static int ds1672_set_datetime(struct i2c_client *client, struct rtc_time *tm)
dev_dbg(&client->dev, dev_dbg(&client->dev,
"%s: secs=%d, mins=%d, hours=%d, " "%s: secs=%d, mins=%d, hours=%d, "
"mday=%d, mon=%d, year=%d, wday=%d\n", "mday=%d, mon=%d, year=%d, wday=%d\n",
__FUNCTION__, __func__,
tm->tm_sec, tm->tm_min, tm->tm_hour, tm->tm_sec, tm->tm_min, tm->tm_hour,
tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); 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) ...@@ -133,7 +133,7 @@ static int ds1672_get_control(struct i2c_client *client, u8 *status)
/* read control register */ /* read control register */
if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) { 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; return -EIO;
} }
...@@ -199,7 +199,7 @@ static int ds1672_probe(struct i2c_adapter *adapter, int address, int kind) ...@@ -199,7 +199,7 @@ static int ds1672_probe(struct i2c_adapter *adapter, int address, int kind)
struct i2c_client *client; struct i2c_client *client;
struct rtc_device *rtc; 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)) { if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) {
err = -ENODEV; err = -ENODEV;
......
...@@ -98,7 +98,7 @@ static int max6900_i2c_read_regs(struct i2c_client *client, u8 *buf) ...@@ -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)); rc = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs));
if (rc != ARRAY_SIZE(msgs)) { if (rc != ARRAY_SIZE(msgs)) {
dev_err(&client->dev, "%s: register read failed\n", dev_err(&client->dev, "%s: register read failed\n",
__FUNCTION__); __func__);
return -EIO; return -EIO;
} }
return 0; return 0;
...@@ -150,7 +150,7 @@ static int max6900_i2c_write_regs(struct i2c_client *client, u8 const *buf) ...@@ -150,7 +150,7 @@ static int max6900_i2c_write_regs(struct i2c_client *client, u8 const *buf)
write_failed: write_failed:
dev_err(&client->dev, "%s: register write failed\n", dev_err(&client->dev, "%s: register write failed\n",
__FUNCTION__); __func__);
return -EIO; return -EIO;
} }
...@@ -214,7 +214,7 @@ static int max6900_i2c_clear_write_protect(struct i2c_client *client) ...@@ -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); rc = i2c_smbus_write_byte_data (client, MAX6900_REG_CONTROL_WRITE, 0);
if (rc < 0) { if (rc < 0) {
dev_err(&client->dev, "%s: control register write failed\n", dev_err(&client->dev, "%s: control register write failed\n",
__FUNCTION__); __func__);
return -EIO; return -EIO;
} }
return 0; return 0;
......
...@@ -140,7 +140,7 @@ static int max6902_get_datetime(struct device *dev, struct rtc_time *dt) ...@@ -140,7 +140,7 @@ static int max6902_get_datetime(struct device *dev, struct rtc_time *dt)
dt->tm_year -= 1900; dt->tm_year -= 1900;
#ifdef MAX6902_DEBUG #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_hour: %i\n",dt->tm_hour);
printk("tm_min : %i\n",dt->tm_min); printk("tm_min : %i\n",dt->tm_min);
printk("tm_sec : %i\n",dt->tm_sec); printk("tm_sec : %i\n",dt->tm_sec);
...@@ -158,7 +158,7 @@ static int max6902_set_datetime(struct device *dev, struct rtc_time *dt) ...@@ -158,7 +158,7 @@ static int max6902_set_datetime(struct device *dev, struct rtc_time *dt)
dt->tm_year = dt->tm_year+1900; dt->tm_year = dt->tm_year+1900;
#ifdef MAX6902_DEBUG #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_sec : %i\n",dt->tm_sec);
printk("tm_min : %i\n",dt->tm_min); printk("tm_min : %i\n",dt->tm_min);
printk("tm_hour: %i\n",dt->tm_hour); printk("tm_hour: %i\n",dt->tm_hour);
......
...@@ -80,7 +80,7 @@ static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm) ...@@ -80,7 +80,7 @@ static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm)
/* read registers */ /* read registers */
if ((i2c_transfer(client->adapter, msgs, 2)) != 2) { 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; return -EIO;
} }
...@@ -91,7 +91,7 @@ static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm) ...@@ -91,7 +91,7 @@ static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm)
dev_dbg(&client->dev, dev_dbg(&client->dev,
"%s: raw data is st1=%02x, st2=%02x, sec=%02x, min=%02x, hr=%02x, " "%s: raw data is st1=%02x, st2=%02x, sec=%02x, min=%02x, hr=%02x, "
"mday=%02x, wday=%02x, mon=%02x, year=%02x\n", "mday=%02x, wday=%02x, mon=%02x, year=%02x\n",
__FUNCTION__, __func__,
buf[0], buf[1], buf[2], buf[3], buf[0], buf[1], buf[2], buf[3],
buf[4], buf[5], buf[6], buf[7], buf[4], buf[5], buf[6], buf[7],
buf[8]); buf[8]);
...@@ -112,7 +112,7 @@ static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm) ...@@ -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, " dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
"mday=%d, mon=%d, year=%d, wday=%d\n", "mday=%d, mon=%d, year=%d, wday=%d\n",
__FUNCTION__, __func__,
tm->tm_sec, tm->tm_min, tm->tm_hour, tm->tm_sec, tm->tm_min, tm->tm_hour,
tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); 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) ...@@ -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, " dev_dbg(&client->dev, "%s: secs=%d, mins=%d, hours=%d, "
"mday=%d, mon=%d, year=%d, wday=%d\n", "mday=%d, mon=%d, year=%d, wday=%d\n",
__FUNCTION__, __func__,
tm->tm_sec, tm->tm_min, tm->tm_hour, tm->tm_sec, tm->tm_min, tm->tm_hour,
tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); 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) ...@@ -163,7 +163,7 @@ static int pcf8563_set_datetime(struct i2c_client *client, struct rtc_time *tm)
if (err != sizeof(data)) { if (err != sizeof(data)) {
dev_err(&client->dev, dev_err(&client->dev,
"%s: err=%d addr=%02x, data=%02x\n", "%s: err=%d addr=%02x, data=%02x\n",
__FUNCTION__, err, data[0], data[1]); __func__, err, data[0], data[1]);
return -EIO; return -EIO;
} }
}; };
...@@ -208,7 +208,7 @@ static int pcf8563_validate_client(struct i2c_client *client) ...@@ -208,7 +208,7 @@ static int pcf8563_validate_client(struct i2c_client *client)
if (xfer != ARRAY_SIZE(msgs)) { if (xfer != ARRAY_SIZE(msgs)) {
dev_err(&client->dev, dev_err(&client->dev,
"%s: could not read register 0x%02X\n", "%s: could not read register 0x%02X\n",
__FUNCTION__, pattern[i].reg); __func__, pattern[i].reg);
return -EIO; return -EIO;
} }
...@@ -220,7 +220,7 @@ static int pcf8563_validate_client(struct i2c_client *client) ...@@ -220,7 +220,7 @@ static int pcf8563_validate_client(struct i2c_client *client)
dev_dbg(&client->dev, dev_dbg(&client->dev,
"%s: pattern=%d, reg=%x, mask=0x%02x, min=%d, " "%s: pattern=%d, reg=%x, mask=0x%02x, min=%d, "
"max=%d, value=%d, raw=0x%02X\n", "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, pattern[i].min, pattern[i].max,
value, buf); value, buf);
......
...@@ -228,7 +228,7 @@ static int rs5c313_rtc_read_time(struct device *dev, struct rtc_time *tm) ...@@ -228,7 +228,7 @@ static int rs5c313_rtc_read_time(struct device *dev, struct rtc_time *tm)
ndelay(700); /* CE:L */ ndelay(700); /* CE:L */
if (cnt++ > 100) { if (cnt++ > 100) {
dev_err(dev, "%s: timeout error\n", __FUNCTION__); dev_err(dev, "%s: timeout error\n", __func__);
return -EIO; return -EIO;
} }
} }
...@@ -289,7 +289,7 @@ static int rs5c313_rtc_set_time(struct device *dev, struct rtc_time *tm) ...@@ -289,7 +289,7 @@ static int rs5c313_rtc_set_time(struct device *dev, struct rtc_time *tm)
ndelay(700); /* CE:L */ ndelay(700); /* CE:L */
if (cnt++ > 100) { if (cnt++ > 100) {
dev_err(dev, "%s: timeout error\n", __FUNCTION__); dev_err(dev, "%s: timeout error\n", __func__);
return -EIO; return -EIO;
} }
} }
......
...@@ -166,7 +166,7 @@ static int rs5c372_get_datetime(struct i2c_client *client, struct rtc_time *tm) ...@@ -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, " dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
"mday=%d, mon=%d, year=%d, wday=%d\n", "mday=%d, mon=%d, year=%d, wday=%d\n",
__FUNCTION__, __func__,
tm->tm_sec, tm->tm_min, tm->tm_hour, tm->tm_sec, tm->tm_min, tm->tm_hour,
tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); 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) ...@@ -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 " dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d "
"mday=%d, mon=%d, year=%d, wday=%d\n", "mday=%d, mon=%d, year=%d, wday=%d\n",
__FUNCTION__, __func__,
tm->tm_sec, tm->tm_min, tm->tm_hour, tm->tm_sec, tm->tm_min, tm->tm_hour,
tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); 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) ...@@ -195,7 +195,7 @@ static int rs5c372_set_datetime(struct i2c_client *client, struct rtc_time *tm)
buf[7] = BIN2BCD(tm->tm_year - 100); buf[7] = BIN2BCD(tm->tm_year - 100);
if ((i2c_master_send(client, buf, 8)) != 8) { 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; return -EIO;
} }
...@@ -220,7 +220,7 @@ static int rs5c372_get_trim(struct i2c_client *client, int *osc, int *trim) ...@@ -220,7 +220,7 @@ static int rs5c372_get_trim(struct i2c_client *client, int *osc, int *trim)
*osc = (tmp & RS5C372_TRIM_XSL) ? 32000 : 32768; *osc = (tmp & RS5C372_TRIM_XSL) ? 32000 : 32768;
if (trim) { 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; tmp &= RS5C372_TRIM_MASK;
if (tmp & 0x3e) { if (tmp & 0x3e) {
int t = tmp & 0x3f; int t = tmp & 0x3f;
...@@ -500,7 +500,7 @@ static int rs5c372_probe(struct i2c_client *client) ...@@ -500,7 +500,7 @@ static int rs5c372_probe(struct i2c_client *client)
struct rs5c372 *rs5c372; struct rs5c372 *rs5c372;
struct rtc_time tm; 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)) { if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
err = -ENODEV; err = -ENODEV;
......
...@@ -68,7 +68,7 @@ static void s3c_rtc_setaie(int to) ...@@ -68,7 +68,7 @@ static void s3c_rtc_setaie(int to)
{ {
unsigned int tmp; 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; tmp = readb(s3c_rtc_base + S3C2410_RTCALM) & ~S3C2410_RTCALM_ALMEN;
...@@ -82,7 +82,7 @@ static void s3c_rtc_setpie(int to) ...@@ -82,7 +82,7 @@ static void s3c_rtc_setpie(int to)
{ {
unsigned int tmp; 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); spin_lock_irq(&s3c_rtc_pie_lock);
tmp = readb(s3c_rtc_base + S3C2410_TICNT) & ~S3C2410_TICNT_ENABLE; tmp = readb(s3c_rtc_base + S3C2410_TICNT) & ~S3C2410_TICNT_ENABLE;
...@@ -457,7 +457,7 @@ static int s3c_rtc_probe(struct platform_device *pdev) ...@@ -457,7 +457,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
struct resource *res; struct resource *res;
int ret; int ret;
pr_debug("%s: probe=%p\n", __FUNCTION__, pdev); pr_debug("%s: probe=%p\n", __func__, pdev);
/* find the IRQs */ /* find the IRQs */
......
...@@ -361,7 +361,7 @@ static int sh_rtc_read_time(struct device *dev, struct rtc_time *tm) ...@@ -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, " dev_dbg(dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
"mday=%d, mon=%d, year=%d, wday=%d\n", "mday=%d, mon=%d, year=%d, wday=%d\n",
__FUNCTION__, __func__,
tm->tm_sec, tm->tm_min, tm->tm_hour, tm->tm_sec, tm->tm_min, tm->tm_hour,
tm->tm_mday, tm->tm_mon + 1, tm->tm_year, tm->tm_wday); tm->tm_mday, tm->tm_mon + 1, tm->tm_year, tm->tm_wday);
......
...@@ -107,7 +107,7 @@ static int v3020_read_time(struct device *dev, struct rtc_time *dt) ...@@ -107,7 +107,7 @@ static int v3020_read_time(struct device *dev, struct rtc_time *dt)
dt->tm_year = BCD2BIN(tmp)+100; dt->tm_year = BCD2BIN(tmp)+100;
#ifdef DEBUG #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_hour: %i\n",dt->tm_hour);
printk("tm_min : %i\n",dt->tm_min); printk("tm_min : %i\n",dt->tm_min);
printk("tm_sec : %i\n",dt->tm_sec); printk("tm_sec : %i\n",dt->tm_sec);
...@@ -126,7 +126,7 @@ static int v3020_set_time(struct device *dev, struct rtc_time *dt) ...@@ -126,7 +126,7 @@ static int v3020_set_time(struct device *dev, struct rtc_time *dt)
struct v3020 *chip = dev_get_drvdata(dev); struct v3020 *chip = dev_get_drvdata(dev);
#ifdef DEBUG #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_sec : %i\n",dt->tm_sec);
printk("tm_min : %i\n",dt->tm_min); printk("tm_min : %i\n",dt->tm_min);
printk("tm_hour: %i\n",dt->tm_hour); printk("tm_hour: %i\n",dt->tm_hour);
......
...@@ -99,14 +99,14 @@ static int x1205_get_datetime(struct i2c_client *client, struct rtc_time *tm, ...@@ -99,14 +99,14 @@ static int x1205_get_datetime(struct i2c_client *client, struct rtc_time *tm,
/* read date registers */ /* read date registers */
if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) { 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; return -EIO;
} }
dev_dbg(&client->dev, dev_dbg(&client->dev,
"%s: raw read data - sec=%02x, min=%02x, hr=%02x, " "%s: raw read data - sec=%02x, min=%02x, hr=%02x, "
"mday=%02x, mon=%02x, year=%02x, wday=%02x, y2k=%02x\n", "mday=%02x, mon=%02x, year=%02x, wday=%02x, y2k=%02x\n",
__FUNCTION__, __func__,
buf[0], buf[1], buf[2], buf[3], buf[0], buf[1], buf[2], buf[3],
buf[4], buf[5], buf[6], buf[7]); 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, ...@@ -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, " dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
"mday=%d, mon=%d, year=%d, wday=%d\n", "mday=%d, mon=%d, year=%d, wday=%d\n",
__FUNCTION__, __func__,
tm->tm_sec, tm->tm_min, tm->tm_hour, tm->tm_sec, tm->tm_min, tm->tm_hour,
tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); 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) ...@@ -139,7 +139,7 @@ static int x1205_get_status(struct i2c_client *client, unsigned char *sr)
/* read status register */ /* read status register */
if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) { 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; return -EIO;
} }
...@@ -162,7 +162,7 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm, ...@@ -162,7 +162,7 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm,
dev_dbg(&client->dev, dev_dbg(&client->dev,
"%s: secs=%d, mins=%d, hours=%d\n", "%s: secs=%d, mins=%d, hours=%d\n",
__FUNCTION__, __func__,
tm->tm_sec, tm->tm_min, tm->tm_hour); tm->tm_sec, tm->tm_min, tm->tm_hour);
buf[CCR_SEC] = BIN2BCD(tm->tm_sec); buf[CCR_SEC] = BIN2BCD(tm->tm_sec);
...@@ -175,7 +175,7 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm, ...@@ -175,7 +175,7 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm,
if (datetoo) { if (datetoo) {
dev_dbg(&client->dev, dev_dbg(&client->dev,
"%s: mday=%d, mon=%d, year=%d, wday=%d\n", "%s: mday=%d, mon=%d, year=%d, wday=%d\n",
__FUNCTION__, __func__,
tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
buf[CCR_MDAY] = BIN2BCD(tm->tm_mday); buf[CCR_MDAY] = BIN2BCD(tm->tm_mday);
...@@ -191,12 +191,12 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm, ...@@ -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 */ /* this sequence is required to unlock the chip */
if ((xfer = i2c_master_send(client, wel, 3)) != 3) { 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; return -EIO;
} }
if ((xfer = i2c_master_send(client, rwel, 3)) != 3) { 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; return -EIO;
} }
...@@ -208,7 +208,7 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm, ...@@ -208,7 +208,7 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm,
if (xfer != 3) { if (xfer != 3) {
dev_err(&client->dev, dev_err(&client->dev,
"%s: xfer=%d addr=%02x, data=%02x\n", "%s: xfer=%d addr=%02x, data=%02x\n",
__FUNCTION__, __func__,
xfer, rdata[1], rdata[2]); xfer, rdata[1], rdata[2]);
return -EIO; return -EIO;
} }
...@@ -216,7 +216,7 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm, ...@@ -216,7 +216,7 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm,
/* disable further writes */ /* disable further writes */
if ((xfer = i2c_master_send(client, diswe, 3)) != 3) { 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; return -EIO;
} }
...@@ -249,11 +249,11 @@ static int x1205_get_dtrim(struct i2c_client *client, int *trim) ...@@ -249,11 +249,11 @@ static int x1205_get_dtrim(struct i2c_client *client, int *trim)
/* read dtr register */ /* read dtr register */
if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) { 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; 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; *trim = 0;
...@@ -281,11 +281,11 @@ static int x1205_get_atrim(struct i2c_client *client, int *trim) ...@@ -281,11 +281,11 @@ static int x1205_get_atrim(struct i2c_client *client, int *trim)
/* read atr register */ /* read atr register */
if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) { 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; 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, /* atr is a two's complement value on 6 bits,
* perform sign extension. The formula is * perform sign extension. The formula is
...@@ -294,11 +294,11 @@ static int x1205_get_atrim(struct i2c_client *client, int *trim) ...@@ -294,11 +294,11 @@ static int x1205_get_atrim(struct i2c_client *client, int *trim)
if (atr & 0x20) if (atr & 0x20)
atr |= 0xC0; 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; *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; return 0;
} }
...@@ -352,7 +352,7 @@ static int x1205_validate_client(struct i2c_client *client) ...@@ -352,7 +352,7 @@ static int x1205_validate_client(struct i2c_client *client)
if ((xfer = i2c_transfer(client->adapter, msgs, 2)) != 2) { if ((xfer = i2c_transfer(client->adapter, msgs, 2)) != 2) {
dev_err(&client->dev, dev_err(&client->dev,
"%s: could not read register %x\n", "%s: could not read register %x\n",
__FUNCTION__, probe_zero_pattern[i]); __func__, probe_zero_pattern[i]);
return -EIO; return -EIO;
} }
...@@ -360,7 +360,7 @@ static int x1205_validate_client(struct i2c_client *client) ...@@ -360,7 +360,7 @@ static int x1205_validate_client(struct i2c_client *client)
if ((buf & probe_zero_pattern[i+1]) != 0) { if ((buf & probe_zero_pattern[i+1]) != 0) {
dev_err(&client->dev, dev_err(&client->dev,
"%s: register=%02x, zero pattern=%d, value=%x\n", "%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; return -ENODEV;
} }
...@@ -380,7 +380,7 @@ static int x1205_validate_client(struct i2c_client *client) ...@@ -380,7 +380,7 @@ static int x1205_validate_client(struct i2c_client *client)
if ((xfer = i2c_transfer(client->adapter, msgs, 2)) != 2) { if ((xfer = i2c_transfer(client->adapter, msgs, 2)) != 2) {
dev_err(&client->dev, dev_err(&client->dev,
"%s: could not read register %x\n", "%s: could not read register %x\n",
__FUNCTION__, probe_limits_pattern[i].reg); __func__, probe_limits_pattern[i].reg);
return -EIO; return -EIO;
} }
...@@ -391,7 +391,7 @@ static int x1205_validate_client(struct i2c_client *client) ...@@ -391,7 +391,7 @@ static int x1205_validate_client(struct i2c_client *client)
value < probe_limits_pattern[i].min) { value < probe_limits_pattern[i].min) {
dev_dbg(&client->dev, dev_dbg(&client->dev,
"%s: register=%x, lim pattern=%d, value=%d\n", "%s: register=%x, lim pattern=%d, value=%d\n",
__FUNCTION__, probe_limits_pattern[i].reg, __func__, probe_limits_pattern[i].reg,
i, value); i, value);
return -ENODEV; return -ENODEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment