diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-04-28 05:12:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:17 -0400 |
commit | 2a4e2b8780c6df42b19c053243dada7fa4d311ee (patch) | |
tree | 4970af3a9ee9c2a8b3e4861ac552cb9262acbaa0 /drivers/rtc/rtc-x1205.c | |
parent | dca03a51549bc645685fb8a77efa64df531666c3 (diff) |
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>
Diffstat (limited to 'drivers/rtc/rtc-x1205.c')
-rw-r--r-- | drivers/rtc/rtc-x1205.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/rtc/rtc-x1205.c b/drivers/rtc/rtc-x1205.c index bb3290360091..095282f63523 100644 --- a/drivers/rtc/rtc-x1205.c +++ b/drivers/rtc/rtc-x1205.c | |||
@@ -99,14 +99,14 @@ static int x1205_get_datetime(struct i2c_client *client, struct rtc_time *tm, | |||
99 | 99 | ||
100 | /* read date registers */ | 100 | /* read date registers */ |
101 | if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) { | 101 | if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) { |
102 | dev_err(&client->dev, "%s: read error\n", __FUNCTION__); | 102 | dev_err(&client->dev, "%s: read error\n", __func__); |
103 | return -EIO; | 103 | return -EIO; |
104 | } | 104 | } |
105 | 105 | ||
106 | dev_dbg(&client->dev, | 106 | dev_dbg(&client->dev, |
107 | "%s: raw read data - sec=%02x, min=%02x, hr=%02x, " | 107 | "%s: raw read data - sec=%02x, min=%02x, hr=%02x, " |
108 | "mday=%02x, mon=%02x, year=%02x, wday=%02x, y2k=%02x\n", | 108 | "mday=%02x, mon=%02x, year=%02x, wday=%02x, y2k=%02x\n", |
109 | __FUNCTION__, | 109 | __func__, |
110 | buf[0], buf[1], buf[2], buf[3], | 110 | buf[0], buf[1], buf[2], buf[3], |
111 | buf[4], buf[5], buf[6], buf[7]); | 111 | buf[4], buf[5], buf[6], buf[7]); |
112 | 112 | ||
@@ -121,7 +121,7 @@ static int x1205_get_datetime(struct i2c_client *client, struct rtc_time *tm, | |||
121 | 121 | ||
122 | dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d, " | 122 | dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d, " |
123 | "mday=%d, mon=%d, year=%d, wday=%d\n", | 123 | "mday=%d, mon=%d, year=%d, wday=%d\n", |
124 | __FUNCTION__, | 124 | __func__, |
125 | tm->tm_sec, tm->tm_min, tm->tm_hour, | 125 | tm->tm_sec, tm->tm_min, tm->tm_hour, |
126 | tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); | 126 | tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); |
127 | 127 | ||
@@ -139,7 +139,7 @@ static int x1205_get_status(struct i2c_client *client, unsigned char *sr) | |||
139 | 139 | ||
140 | /* read status register */ | 140 | /* read status register */ |
141 | if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) { | 141 | if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) { |
142 | dev_err(&client->dev, "%s: read error\n", __FUNCTION__); | 142 | dev_err(&client->dev, "%s: read error\n", __func__); |
143 | return -EIO; | 143 | return -EIO; |
144 | } | 144 | } |
145 | 145 | ||
@@ -162,7 +162,7 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm, | |||
162 | 162 | ||
163 | dev_dbg(&client->dev, | 163 | dev_dbg(&client->dev, |
164 | "%s: secs=%d, mins=%d, hours=%d\n", | 164 | "%s: secs=%d, mins=%d, hours=%d\n", |
165 | __FUNCTION__, | 165 | __func__, |
166 | tm->tm_sec, tm->tm_min, tm->tm_hour); | 166 | tm->tm_sec, tm->tm_min, tm->tm_hour); |
167 | 167 | ||
168 | buf[CCR_SEC] = BIN2BCD(tm->tm_sec); | 168 | 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 | if (datetoo) { | 175 | if (datetoo) { |
176 | dev_dbg(&client->dev, | 176 | dev_dbg(&client->dev, |
177 | "%s: mday=%d, mon=%d, year=%d, wday=%d\n", | 177 | "%s: mday=%d, mon=%d, year=%d, wday=%d\n", |
178 | __FUNCTION__, | 178 | __func__, |
179 | tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); | 179 | tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); |
180 | 180 | ||
181 | buf[CCR_MDAY] = BIN2BCD(tm->tm_mday); | 181 | 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 | 191 | ||
192 | /* this sequence is required to unlock the chip */ | 192 | /* this sequence is required to unlock the chip */ |
193 | if ((xfer = i2c_master_send(client, wel, 3)) != 3) { | 193 | if ((xfer = i2c_master_send(client, wel, 3)) != 3) { |
194 | dev_err(&client->dev, "%s: wel - %d\n", __FUNCTION__, xfer); | 194 | dev_err(&client->dev, "%s: wel - %d\n", __func__, xfer); |
195 | return -EIO; | 195 | return -EIO; |
196 | } | 196 | } |
197 | 197 | ||
198 | if ((xfer = i2c_master_send(client, rwel, 3)) != 3) { | 198 | if ((xfer = i2c_master_send(client, rwel, 3)) != 3) { |
199 | dev_err(&client->dev, "%s: rwel - %d\n", __FUNCTION__, xfer); | 199 | dev_err(&client->dev, "%s: rwel - %d\n", __func__, xfer); |
200 | return -EIO; | 200 | return -EIO; |
201 | } | 201 | } |
202 | 202 | ||
@@ -208,7 +208,7 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm, | |||
208 | if (xfer != 3) { | 208 | if (xfer != 3) { |
209 | dev_err(&client->dev, | 209 | dev_err(&client->dev, |
210 | "%s: xfer=%d addr=%02x, data=%02x\n", | 210 | "%s: xfer=%d addr=%02x, data=%02x\n", |
211 | __FUNCTION__, | 211 | __func__, |
212 | xfer, rdata[1], rdata[2]); | 212 | xfer, rdata[1], rdata[2]); |
213 | return -EIO; | 213 | return -EIO; |
214 | } | 214 | } |
@@ -216,7 +216,7 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm, | |||
216 | 216 | ||
217 | /* disable further writes */ | 217 | /* disable further writes */ |
218 | if ((xfer = i2c_master_send(client, diswe, 3)) != 3) { | 218 | if ((xfer = i2c_master_send(client, diswe, 3)) != 3) { |
219 | dev_err(&client->dev, "%s: diswe - %d\n", __FUNCTION__, xfer); | 219 | dev_err(&client->dev, "%s: diswe - %d\n", __func__, xfer); |
220 | return -EIO; | 220 | return -EIO; |
221 | } | 221 | } |
222 | 222 | ||
@@ -249,11 +249,11 @@ static int x1205_get_dtrim(struct i2c_client *client, int *trim) | |||
249 | 249 | ||
250 | /* read dtr register */ | 250 | /* read dtr register */ |
251 | if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) { | 251 | if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) { |
252 | dev_err(&client->dev, "%s: read error\n", __FUNCTION__); | 252 | dev_err(&client->dev, "%s: read error\n", __func__); |
253 | return -EIO; | 253 | return -EIO; |
254 | } | 254 | } |
255 | 255 | ||
256 | dev_dbg(&client->dev, "%s: raw dtr=%x\n", __FUNCTION__, dtr); | 256 | dev_dbg(&client->dev, "%s: raw dtr=%x\n", __func__, dtr); |
257 | 257 | ||
258 | *trim = 0; | 258 | *trim = 0; |
259 | 259 | ||
@@ -281,11 +281,11 @@ static int x1205_get_atrim(struct i2c_client *client, int *trim) | |||
281 | 281 | ||
282 | /* read atr register */ | 282 | /* read atr register */ |
283 | if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) { | 283 | if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) { |
284 | dev_err(&client->dev, "%s: read error\n", __FUNCTION__); | 284 | dev_err(&client->dev, "%s: read error\n", __func__); |
285 | return -EIO; | 285 | return -EIO; |
286 | } | 286 | } |
287 | 287 | ||
288 | dev_dbg(&client->dev, "%s: raw atr=%x\n", __FUNCTION__, atr); | 288 | dev_dbg(&client->dev, "%s: raw atr=%x\n", __func__, atr); |
289 | 289 | ||
290 | /* atr is a two's complement value on 6 bits, | 290 | /* atr is a two's complement value on 6 bits, |
291 | * perform sign extension. The formula is | 291 | * perform sign extension. The formula is |
@@ -294,11 +294,11 @@ static int x1205_get_atrim(struct i2c_client *client, int *trim) | |||
294 | if (atr & 0x20) | 294 | if (atr & 0x20) |
295 | atr |= 0xC0; | 295 | atr |= 0xC0; |
296 | 296 | ||
297 | dev_dbg(&client->dev, "%s: raw atr=%x (%d)\n", __FUNCTION__, atr, atr); | 297 | dev_dbg(&client->dev, "%s: raw atr=%x (%d)\n", __func__, atr, atr); |
298 | 298 | ||
299 | *trim = (atr * 250) + 11000; | 299 | *trim = (atr * 250) + 11000; |
300 | 300 | ||
301 | dev_dbg(&client->dev, "%s: real=%d\n", __FUNCTION__, *trim); | 301 | dev_dbg(&client->dev, "%s: real=%d\n", __func__, *trim); |
302 | 302 | ||
303 | return 0; | 303 | return 0; |
304 | } | 304 | } |
@@ -352,7 +352,7 @@ static int x1205_validate_client(struct i2c_client *client) | |||
352 | if ((xfer = i2c_transfer(client->adapter, msgs, 2)) != 2) { | 352 | if ((xfer = i2c_transfer(client->adapter, msgs, 2)) != 2) { |
353 | dev_err(&client->dev, | 353 | dev_err(&client->dev, |
354 | "%s: could not read register %x\n", | 354 | "%s: could not read register %x\n", |
355 | __FUNCTION__, probe_zero_pattern[i]); | 355 | __func__, probe_zero_pattern[i]); |
356 | 356 | ||
357 | return -EIO; | 357 | return -EIO; |
358 | } | 358 | } |
@@ -360,7 +360,7 @@ static int x1205_validate_client(struct i2c_client *client) | |||
360 | if ((buf & probe_zero_pattern[i+1]) != 0) { | 360 | if ((buf & probe_zero_pattern[i+1]) != 0) { |
361 | dev_err(&client->dev, | 361 | dev_err(&client->dev, |
362 | "%s: register=%02x, zero pattern=%d, value=%x\n", | 362 | "%s: register=%02x, zero pattern=%d, value=%x\n", |
363 | __FUNCTION__, probe_zero_pattern[i], i, buf); | 363 | __func__, probe_zero_pattern[i], i, buf); |
364 | 364 | ||
365 | return -ENODEV; | 365 | return -ENODEV; |
366 | } | 366 | } |
@@ -380,7 +380,7 @@ static int x1205_validate_client(struct i2c_client *client) | |||
380 | if ((xfer = i2c_transfer(client->adapter, msgs, 2)) != 2) { | 380 | if ((xfer = i2c_transfer(client->adapter, msgs, 2)) != 2) { |
381 | dev_err(&client->dev, | 381 | dev_err(&client->dev, |
382 | "%s: could not read register %x\n", | 382 | "%s: could not read register %x\n", |
383 | __FUNCTION__, probe_limits_pattern[i].reg); | 383 | __func__, probe_limits_pattern[i].reg); |
384 | 384 | ||
385 | return -EIO; | 385 | return -EIO; |
386 | } | 386 | } |
@@ -391,7 +391,7 @@ static int x1205_validate_client(struct i2c_client *client) | |||
391 | value < probe_limits_pattern[i].min) { | 391 | value < probe_limits_pattern[i].min) { |
392 | dev_dbg(&client->dev, | 392 | dev_dbg(&client->dev, |
393 | "%s: register=%x, lim pattern=%d, value=%d\n", | 393 | "%s: register=%x, lim pattern=%d, value=%d\n", |
394 | __FUNCTION__, probe_limits_pattern[i].reg, | 394 | __func__, probe_limits_pattern[i].reg, |
395 | i, value); | 395 | i, value); |
396 | 396 | ||
397 | return -ENODEV; | 397 | return -ENODEV; |