Skip to content

Commit 2a4e2b8

Browse files
hharrisontorvalds
authored andcommitted
rtc: replace remaining __FUNCTION__ occurrences
__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>
1 parent dca03a5 commit 2a4e2b8

13 files changed

Lines changed: 60 additions & 60 deletions

‎drivers/rtc/rtc-at91rm9200.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static int at91_rtc_readtime(struct device *dev, struct rtc_time *tm)
8383
tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, tm->tm_year);
8484
tm->tm_year = tm->tm_year - 1900;
8585

86-
pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __FUNCTION__,
86+
pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __func__,
8787
1900 + tm->tm_year, tm->tm_mon, tm->tm_mday,
8888
tm->tm_hour, tm->tm_min, tm->tm_sec);
8989

@@ -97,7 +97,7 @@ static int at91_rtc_settime(struct device *dev, struct rtc_time *tm)
9797
{
9898
unsigned long cr;
9999

100-
pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __FUNCTION__,
100+
pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __func__,
101101
1900 + tm->tm_year, tm->tm_mon, tm->tm_mday,
102102
tm->tm_hour, tm->tm_min, tm->tm_sec);
103103

@@ -142,7 +142,7 @@ static int at91_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm)
142142
alrm->enabled = (at91_sys_read(AT91_RTC_IMR) & AT91_RTC_ALARM)
143143
? 1 : 0;
144144

145-
pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __FUNCTION__,
145+
pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __func__,
146146
1900 + tm->tm_year, tm->tm_mon, tm->tm_mday,
147147
tm->tm_hour, tm->tm_min, tm->tm_sec);
148148

@@ -178,7 +178,7 @@ static int at91_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
178178
if (alrm->enabled)
179179
at91_sys_write(AT91_RTC_IER, AT91_RTC_ALARM);
180180

181-
pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __FUNCTION__,
181+
pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __func__,
182182
at91_alarm_year, tm.tm_mon, tm.tm_mday, tm.tm_hour,
183183
tm.tm_min, tm.tm_sec);
184184

@@ -193,7 +193,7 @@ static int at91_rtc_ioctl(struct device *dev, unsigned int cmd,
193193
{
194194
int ret = 0;
195195

196-
pr_debug("%s(): cmd=%08x, arg=%08lx.\n", __FUNCTION__, cmd, arg);
196+
pr_debug("%s(): cmd=%08x, arg=%08lx.\n", __func__, cmd, arg);
197197

198198
switch (cmd) {
199199
case RTC_AIE_OFF: /* alarm off */
@@ -265,7 +265,7 @@ static irqreturn_t at91_rtc_interrupt(int irq, void *dev_id)
265265

266266
rtc_update_irq(rtc, 1, events);
267267

268-
pr_debug("%s(): num=%ld, events=0x%02lx\n", __FUNCTION__,
268+
pr_debug("%s(): num=%ld, events=0x%02lx\n", __func__,
269269
events >> 8, events & 0x000000FF);
270270

271271
return IRQ_HANDLED;

‎drivers/rtc/rtc-at91sam9.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ static irqreturn_t at91_rtc_interrupt(int irq, void *_rtc)
288288

289289
rtc_update_irq(rtc->rtcdev, 1, events);
290290

291-
pr_debug("%s: num=%ld, events=0x%02lx\n", __FUNCTION__,
291+
pr_debug("%s: num=%ld, events=0x%02lx\n", __func__,
292292
events >> 8, events & 0x000000FF);
293293

294294
return IRQ_HANDLED;

‎drivers/rtc/rtc-ds1302.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static int ds1302_rtc_read_time(struct device *dev, struct rtc_time *tm)
122122

123123
dev_dbg(dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
124124
"mday=%d, mon=%d, year=%d, wday=%d\n",
125-
__FUNCTION__,
125+
__func__,
126126
tm->tm_sec, tm->tm_min, tm->tm_hour,
127127
tm->tm_mday, tm->tm_mon + 1, tm->tm_year, tm->tm_wday);
128128

‎drivers/rtc/rtc-ds1672.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,21 @@ static int ds1672_get_datetime(struct i2c_client *client, struct rtc_time *tm)
5050

5151
/* read date registers */
5252
if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) {
53-
dev_err(&client->dev, "%s: read error\n", __FUNCTION__);
53+
dev_err(&client->dev, "%s: read error\n", __func__);
5454
return -EIO;
5555
}
5656

5757
dev_dbg(&client->dev,
5858
"%s: raw read data - counters=%02x,%02x,%02x,%02x\n",
59-
__FUNCTION__, buf[0], buf[1], buf[2], buf[3]);
59+
__func__, buf[0], buf[1], buf[2], buf[3]);
6060

6161
time = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
6262

6363
rtc_time_to_tm(time, tm);
6464

6565
dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
6666
"mday=%d, mon=%d, year=%d, wday=%d\n",
67-
__FUNCTION__, tm->tm_sec, tm->tm_min, tm->tm_hour,
67+
__func__, tm->tm_sec, tm->tm_min, tm->tm_hour,
6868
tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
6969

7070
return 0;
@@ -84,7 +84,7 @@ static int ds1672_set_mmss(struct i2c_client *client, unsigned long secs)
8484

8585
xfer = i2c_master_send(client, buf, 6);
8686
if (xfer != 6) {
87-
dev_err(&client->dev, "%s: send: %d\n", __FUNCTION__, xfer);
87+
dev_err(&client->dev, "%s: send: %d\n", __func__, xfer);
8888
return -EIO;
8989
}
9090

@@ -98,7 +98,7 @@ static int ds1672_set_datetime(struct i2c_client *client, struct rtc_time *tm)
9898
dev_dbg(&client->dev,
9999
"%s: secs=%d, mins=%d, hours=%d, "
100100
"mday=%d, mon=%d, year=%d, wday=%d\n",
101-
__FUNCTION__,
101+
__func__,
102102
tm->tm_sec, tm->tm_min, tm->tm_hour,
103103
tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
104104

@@ -133,7 +133,7 @@ static int ds1672_get_control(struct i2c_client *client, u8 *status)
133133

134134
/* read control register */
135135
if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) {
136-
dev_err(&client->dev, "%s: read error\n", __FUNCTION__);
136+
dev_err(&client->dev, "%s: read error\n", __func__);
137137
return -EIO;
138138
}
139139

@@ -199,7 +199,7 @@ static int ds1672_probe(struct i2c_adapter *adapter, int address, int kind)
199199
struct i2c_client *client;
200200
struct rtc_device *rtc;
201201

202-
dev_dbg(&adapter->dev, "%s\n", __FUNCTION__);
202+
dev_dbg(&adapter->dev, "%s\n", __func__);
203203

204204
if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) {
205205
err = -ENODEV;

‎drivers/rtc/rtc-max6900.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static int max6900_i2c_read_regs(struct i2c_client *client, u8 *buf)
9898
rc = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs));
9999
if (rc != ARRAY_SIZE(msgs)) {
100100
dev_err(&client->dev, "%s: register read failed\n",
101-
__FUNCTION__);
101+
__func__);
102102
return -EIO;
103103
}
104104
return 0;
@@ -150,7 +150,7 @@ static int max6900_i2c_write_regs(struct i2c_client *client, u8 const *buf)
150150

151151
write_failed:
152152
dev_err(&client->dev, "%s: register write failed\n",
153-
__FUNCTION__);
153+
__func__);
154154
return -EIO;
155155
}
156156

@@ -214,7 +214,7 @@ static int max6900_i2c_clear_write_protect(struct i2c_client *client)
214214
rc = i2c_smbus_write_byte_data (client, MAX6900_REG_CONTROL_WRITE, 0);
215215
if (rc < 0) {
216216
dev_err(&client->dev, "%s: control register write failed\n",
217-
__FUNCTION__);
217+
__func__);
218218
return -EIO;
219219
}
220220
return 0;

‎drivers/rtc/rtc-max6902.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static int max6902_get_datetime(struct device *dev, struct rtc_time *dt)
140140
dt->tm_year -= 1900;
141141

142142
#ifdef MAX6902_DEBUG
143-
printk("\n%s : Read RTC values\n",__FUNCTION__);
143+
printk("\n%s : Read RTC values\n",__func__);
144144
printk("tm_hour: %i\n",dt->tm_hour);
145145
printk("tm_min : %i\n",dt->tm_min);
146146
printk("tm_sec : %i\n",dt->tm_sec);
@@ -158,7 +158,7 @@ static int max6902_set_datetime(struct device *dev, struct rtc_time *dt)
158158
dt->tm_year = dt->tm_year+1900;
159159

160160
#ifdef MAX6902_DEBUG
161-
printk("\n%s : Setting RTC values\n",__FUNCTION__);
161+
printk("\n%s : Setting RTC values\n",__func__);
162162
printk("tm_sec : %i\n",dt->tm_sec);
163163
printk("tm_min : %i\n",dt->tm_min);
164164
printk("tm_hour: %i\n",dt->tm_hour);

‎drivers/rtc/rtc-pcf8563.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm)
8080

8181
/* read registers */
8282
if ((i2c_transfer(client->adapter, msgs, 2)) != 2) {
83-
dev_err(&client->dev, "%s: read error\n", __FUNCTION__);
83+
dev_err(&client->dev, "%s: read error\n", __func__);
8484
return -EIO;
8585
}
8686

@@ -91,7 +91,7 @@ static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm)
9191
dev_dbg(&client->dev,
9292
"%s: raw data is st1=%02x, st2=%02x, sec=%02x, min=%02x, hr=%02x, "
9393
"mday=%02x, wday=%02x, mon=%02x, year=%02x\n",
94-
__FUNCTION__,
94+
__func__,
9595
buf[0], buf[1], buf[2], buf[3],
9696
buf[4], buf[5], buf[6], buf[7],
9797
buf[8]);
@@ -112,7 +112,7 @@ static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm)
112112

113113
dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
114114
"mday=%d, mon=%d, year=%d, wday=%d\n",
115-
__FUNCTION__,
115+
__func__,
116116
tm->tm_sec, tm->tm_min, tm->tm_hour,
117117
tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
118118

@@ -133,7 +133,7 @@ static int pcf8563_set_datetime(struct i2c_client *client, struct rtc_time *tm)
133133

134134
dev_dbg(&client->dev, "%s: secs=%d, mins=%d, hours=%d, "
135135
"mday=%d, mon=%d, year=%d, wday=%d\n",
136-
__FUNCTION__,
136+
__func__,
137137
tm->tm_sec, tm->tm_min, tm->tm_hour,
138138
tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
139139

@@ -163,7 +163,7 @@ static int pcf8563_set_datetime(struct i2c_client *client, struct rtc_time *tm)
163163
if (err != sizeof(data)) {
164164
dev_err(&client->dev,
165165
"%s: err=%d addr=%02x, data=%02x\n",
166-
__FUNCTION__, err, data[0], data[1]);
166+
__func__, err, data[0], data[1]);
167167
return -EIO;
168168
}
169169
};
@@ -208,7 +208,7 @@ static int pcf8563_validate_client(struct i2c_client *client)
208208
if (xfer != ARRAY_SIZE(msgs)) {
209209
dev_err(&client->dev,
210210
"%s: could not read register 0x%02X\n",
211-
__FUNCTION__, pattern[i].reg);
211+
__func__, pattern[i].reg);
212212

213213
return -EIO;
214214
}
@@ -220,7 +220,7 @@ static int pcf8563_validate_client(struct i2c_client *client)
220220
dev_dbg(&client->dev,
221221
"%s: pattern=%d, reg=%x, mask=0x%02x, min=%d, "
222222
"max=%d, value=%d, raw=0x%02X\n",
223-
__FUNCTION__, i, pattern[i].reg, pattern[i].mask,
223+
__func__, i, pattern[i].reg, pattern[i].mask,
224224
pattern[i].min, pattern[i].max,
225225
value, buf);
226226

‎drivers/rtc/rtc-rs5c313.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ static int rs5c313_rtc_read_time(struct device *dev, struct rtc_time *tm)
228228
ndelay(700); /* CE:L */
229229

230230
if (cnt++ > 100) {
231-
dev_err(dev, "%s: timeout error\n", __FUNCTION__);
231+
dev_err(dev, "%s: timeout error\n", __func__);
232232
return -EIO;
233233
}
234234
}
@@ -289,7 +289,7 @@ static int rs5c313_rtc_set_time(struct device *dev, struct rtc_time *tm)
289289
ndelay(700); /* CE:L */
290290

291291
if (cnt++ > 100) {
292-
dev_err(dev, "%s: timeout error\n", __FUNCTION__);
292+
dev_err(dev, "%s: timeout error\n", __func__);
293293
return -EIO;
294294
}
295295
}

‎drivers/rtc/rtc-rs5c372.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ static int rs5c372_get_datetime(struct i2c_client *client, struct rtc_time *tm)
166166

167167
dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
168168
"mday=%d, mon=%d, year=%d, wday=%d\n",
169-
__FUNCTION__,
169+
__func__,
170170
tm->tm_sec, tm->tm_min, tm->tm_hour,
171171
tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
172172

@@ -181,7 +181,7 @@ static int rs5c372_set_datetime(struct i2c_client *client, struct rtc_time *tm)
181181

182182
dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d "
183183
"mday=%d, mon=%d, year=%d, wday=%d\n",
184-
__FUNCTION__,
184+
__func__,
185185
tm->tm_sec, tm->tm_min, tm->tm_hour,
186186
tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
187187

@@ -195,7 +195,7 @@ static int rs5c372_set_datetime(struct i2c_client *client, struct rtc_time *tm)
195195
buf[7] = BIN2BCD(tm->tm_year - 100);
196196

197197
if ((i2c_master_send(client, buf, 8)) != 8) {
198-
dev_err(&client->dev, "%s: write error\n", __FUNCTION__);
198+
dev_err(&client->dev, "%s: write error\n", __func__);
199199
return -EIO;
200200
}
201201

@@ -220,7 +220,7 @@ static int rs5c372_get_trim(struct i2c_client *client, int *osc, int *trim)
220220
*osc = (tmp & RS5C372_TRIM_XSL) ? 32000 : 32768;
221221

222222
if (trim) {
223-
dev_dbg(&client->dev, "%s: raw trim=%x\n", __FUNCTION__, tmp);
223+
dev_dbg(&client->dev, "%s: raw trim=%x\n", __func__, tmp);
224224
tmp &= RS5C372_TRIM_MASK;
225225
if (tmp & 0x3e) {
226226
int t = tmp & 0x3f;
@@ -500,7 +500,7 @@ static int rs5c372_probe(struct i2c_client *client)
500500
struct rs5c372 *rs5c372;
501501
struct rtc_time tm;
502502

503-
dev_dbg(&client->dev, "%s\n", __FUNCTION__);
503+
dev_dbg(&client->dev, "%s\n", __func__);
504504

505505
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
506506
err = -ENODEV;

‎drivers/rtc/rtc-s3c.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static void s3c_rtc_setaie(int to)
6868
{
6969
unsigned int tmp;
7070

71-
pr_debug("%s: aie=%d\n", __FUNCTION__, to);
71+
pr_debug("%s: aie=%d\n", __func__, to);
7272

7373
tmp = readb(s3c_rtc_base + S3C2410_RTCALM) & ~S3C2410_RTCALM_ALMEN;
7474

@@ -82,7 +82,7 @@ static void s3c_rtc_setpie(int to)
8282
{
8383
unsigned int tmp;
8484

85-
pr_debug("%s: pie=%d\n", __FUNCTION__, to);
85+
pr_debug("%s: pie=%d\n", __func__, to);
8686

8787
spin_lock_irq(&s3c_rtc_pie_lock);
8888
tmp = readb(s3c_rtc_base + S3C2410_TICNT) & ~S3C2410_TICNT_ENABLE;
@@ -457,7 +457,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
457457
struct resource *res;
458458
int ret;
459459

460-
pr_debug("%s: probe=%p\n", __FUNCTION__, pdev);
460+
pr_debug("%s: probe=%p\n", __func__, pdev);
461461

462462
/* find the IRQs */
463463

0 commit comments

Comments
 (0)