diff options
| author | Joe Perches <joe@perches.com> | 2015-04-16 15:46:14 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-17 09:04:02 -0400 |
| commit | a737e835e5769ef22897179ed7f82b1fc50bfa58 (patch) | |
| tree | adf239d0ad61f2d92460ded814da3168aca8d0f7 /drivers/rtc | |
| parent | f539a8acf1070557aef9c5df682751ba2af1005f (diff) | |
rtc: use more standard kernel logging styles
Neaten the logging a bit by adding #define pr_fmt
Miscellanea:
o Remove __FILE__/__func__ uses
o Coalesce formats adding missing spaces
o Align arguments
o (rtc-cmos) Integrated 2 consecutive messages
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Joshua Kinard <kumba@gentoo.org>
Cc: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc')
| -rw-r--r-- | drivers/rtc/hctosys.c | 6 | ||||
| -rw-r--r-- | drivers/rtc/rtc-cmos.c | 6 | ||||
| -rw-r--r-- | drivers/rtc/rtc-ds1374.c | 8 | ||||
| -rw-r--r-- | drivers/rtc/rtc-ds1685.c | 4 | ||||
| -rw-r--r-- | drivers/rtc/rtc-ds3232.c | 6 | ||||
| -rw-r--r-- | drivers/rtc/rtc-efi-platform.c | 3 | ||||
| -rw-r--r-- | drivers/rtc/rtc-m41t80.c | 6 | ||||
| -rw-r--r-- | drivers/rtc/rtc-max77686.c | 6 | ||||
| -rw-r--r-- | drivers/rtc/rtc-max8997.c | 8 | ||||
| -rw-r--r-- | drivers/rtc/rtc-msm6242.c | 4 | ||||
| -rw-r--r-- | drivers/rtc/rtc-opal.c | 3 | ||||
| -rw-r--r-- | drivers/rtc/rtc-s5m.c | 4 | ||||
| -rw-r--r-- | drivers/rtc/rtc-twl.c | 9 |
13 files changed, 49 insertions, 24 deletions
diff --git a/drivers/rtc/hctosys.c b/drivers/rtc/hctosys.c index 91fb5f3c1051..e1cfa06810ef 100644 --- a/drivers/rtc/hctosys.c +++ b/drivers/rtc/hctosys.c | |||
| @@ -9,6 +9,8 @@ | |||
| 9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 13 | |||
| 12 | #include <linux/rtc.h> | 14 | #include <linux/rtc.h> |
| 13 | 15 | ||
| 14 | /* IMPORTANT: the RTC only stores whole seconds. It is arbitrary | 16 | /* IMPORTANT: the RTC only stores whole seconds. It is arbitrary |
| @@ -32,8 +34,8 @@ static int __init rtc_hctosys(void) | |||
| 32 | struct rtc_device *rtc = rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE); | 34 | struct rtc_device *rtc = rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE); |
| 33 | 35 | ||
| 34 | if (rtc == NULL) { | 36 | if (rtc == NULL) { |
| 35 | pr_info("%s: unable to open rtc device (%s)\n", | 37 | pr_info("unable to open rtc device (%s)\n", |
| 36 | __func__, CONFIG_RTC_HCTOSYS_DEVICE); | 38 | CONFIG_RTC_HCTOSYS_DEVICE); |
| 37 | goto err_open; | 39 | goto err_open; |
| 38 | } | 40 | } |
| 39 | 41 | ||
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index 87647f459198..a82556a0757a 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c | |||
| @@ -28,6 +28,9 @@ | |||
| 28 | * interrupts disabled, holding the global rtc_lock, to exclude those | 28 | * interrupts disabled, holding the global rtc_lock, to exclude those |
| 29 | * other drivers and utilities on correctly configured systems. | 29 | * other drivers and utilities on correctly configured systems. |
| 30 | */ | 30 | */ |
| 31 | |||
| 32 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 33 | |||
| 31 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
| 32 | #include <linux/module.h> | 35 | #include <linux/module.h> |
| 33 | #include <linux/init.h> | 36 | #include <linux/init.h> |
| @@ -385,8 +388,7 @@ static bool alarm_disable_quirk; | |||
| 385 | static int __init set_alarm_disable_quirk(const struct dmi_system_id *id) | 388 | static int __init set_alarm_disable_quirk(const struct dmi_system_id *id) |
| 386 | { | 389 | { |
| 387 | alarm_disable_quirk = true; | 390 | alarm_disable_quirk = true; |
| 388 | pr_info("rtc-cmos: BIOS has alarm-disable quirk. "); | 391 | pr_info("BIOS has alarm-disable quirk - RTC alarms disabled\n"); |
| 389 | pr_info("RTC alarms disabled\n"); | ||
| 390 | return 0; | 392 | return 0; |
| 391 | } | 393 | } |
| 392 | 394 | ||
diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c index 8605fde394b2..167783fa7ac1 100644 --- a/drivers/rtc/rtc-ds1374.c +++ b/drivers/rtc/rtc-ds1374.c | |||
| @@ -18,6 +18,8 @@ | |||
| 18 | * "Sending and receiving", using SMBus level communication is preferred. | 18 | * "Sending and receiving", using SMBus level communication is preferred. |
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 22 | |||
| 21 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
| 22 | #include <linux/module.h> | 24 | #include <linux/module.h> |
| 23 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
| @@ -406,7 +408,7 @@ static int ds1374_wdt_settimeout(unsigned int timeout) | |||
| 406 | /* Set new watchdog time */ | 408 | /* Set new watchdog time */ |
| 407 | ret = ds1374_write_rtc(save_client, timeout, DS1374_REG_WDALM0, 3); | 409 | ret = ds1374_write_rtc(save_client, timeout, DS1374_REG_WDALM0, 3); |
| 408 | if (ret) { | 410 | if (ret) { |
| 409 | pr_info("rtc-ds1374 - couldn't set new watchdog time\n"); | 411 | pr_info("couldn't set new watchdog time\n"); |
| 410 | goto out; | 412 | goto out; |
| 411 | } | 413 | } |
| 412 | 414 | ||
| @@ -539,12 +541,12 @@ static long ds1374_wdt_ioctl(struct file *file, unsigned int cmd, | |||
| 539 | return -EFAULT; | 541 | return -EFAULT; |
| 540 | 542 | ||
| 541 | if (options & WDIOS_DISABLECARD) { | 543 | if (options & WDIOS_DISABLECARD) { |
| 542 | pr_info("rtc-ds1374: disable watchdog\n"); | 544 | pr_info("disable watchdog\n"); |
| 543 | ds1374_wdt_disable(); | 545 | ds1374_wdt_disable(); |
| 544 | } | 546 | } |
| 545 | 547 | ||
| 546 | if (options & WDIOS_ENABLECARD) { | 548 | if (options & WDIOS_ENABLECARD) { |
| 547 | pr_info("rtc-ds1374: enable watchdog\n"); | 549 | pr_info("enable watchdog\n"); |
| 548 | ds1374_wdt_settimeout(wdt_margin); | 550 | ds1374_wdt_settimeout(wdt_margin); |
| 549 | ds1374_wdt_ping(); | 551 | ds1374_wdt_ping(); |
| 550 | } | 552 | } |
diff --git a/drivers/rtc/rtc-ds1685.c b/drivers/rtc/rtc-ds1685.c index 70202098a8ce..818a3635a8c8 100644 --- a/drivers/rtc/rtc-ds1685.c +++ b/drivers/rtc/rtc-ds1685.c | |||
| @@ -16,6 +16,8 @@ | |||
| 16 | * published by the Free Software Foundation. | 16 | * published by the Free Software Foundation. |
| 17 | */ | 17 | */ |
| 18 | 18 | ||
| 19 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 20 | |||
| 19 | #include <linux/bcd.h> | 21 | #include <linux/bcd.h> |
| 20 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
| 21 | #include <linux/io.h> | 23 | #include <linux/io.h> |
| @@ -2182,7 +2184,7 @@ ds1685_rtc_poweroff(struct platform_device *pdev) | |||
| 2182 | 2184 | ||
| 2183 | /* Check for valid RTC data, else, spin forever. */ | 2185 | /* Check for valid RTC data, else, spin forever. */ |
| 2184 | if (unlikely(!pdev)) { | 2186 | if (unlikely(!pdev)) { |
| 2185 | pr_emerg("rtc-ds1685: platform device data not available, spinning forever ...\n"); | 2187 | pr_emerg("platform device data not available, spinning forever ...\n"); |
| 2186 | unreachable(); | 2188 | unreachable(); |
| 2187 | } else { | 2189 | } else { |
| 2188 | /* Get the rtc data. */ | 2190 | /* Get the rtc data. */ |
diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index adaf06c41479..7e48e532214f 100644 --- a/drivers/rtc/rtc-ds3232.c +++ b/drivers/rtc/rtc-ds3232.c | |||
| @@ -15,6 +15,8 @@ | |||
| 15 | * "Sending and receiving", using SMBus level communication is preferred. | 15 | * "Sending and receiving", using SMBus level communication is preferred. |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 19 | |||
| 18 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
| 19 | #include <linux/module.h> | 21 | #include <linux/module.h> |
| 20 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
| @@ -373,8 +375,8 @@ static void ds3232_work(struct work_struct *work) | |||
| 373 | if (stat & DS3232_REG_SR_A1F) { | 375 | if (stat & DS3232_REG_SR_A1F) { |
| 374 | control = i2c_smbus_read_byte_data(client, DS3232_REG_CR); | 376 | control = i2c_smbus_read_byte_data(client, DS3232_REG_CR); |
| 375 | if (control < 0) { | 377 | if (control < 0) { |
| 376 | pr_warn("Read DS3232 Control Register error." | 378 | pr_warn("Read Control Register error - Disable IRQ%d\n", |
| 377 | "Disable IRQ%d.\n", client->irq); | 379 | client->irq); |
| 378 | } else { | 380 | } else { |
| 379 | /* disable alarm1 interrupt */ | 381 | /* disable alarm1 interrupt */ |
| 380 | control &= ~(DS3232_REG_CR_A1IE); | 382 | control &= ~(DS3232_REG_CR_A1IE); |
diff --git a/drivers/rtc/rtc-efi-platform.c b/drivers/rtc/rtc-efi-platform.c index b40fbe332af4..1a7f1d1bc174 100644 --- a/drivers/rtc/rtc-efi-platform.c +++ b/drivers/rtc/rtc-efi-platform.c | |||
| @@ -8,6 +8,9 @@ | |||
| 8 | * Copyright (C) 1999-2000 VA Linux Systems | 8 | * Copyright (C) 1999-2000 VA Linux Systems |
| 9 | * Copyright (C) 1999-2000 Walt Drummond <drummond@valinux.com> | 9 | * Copyright (C) 1999-2000 Walt Drummond <drummond@valinux.com> |
| 10 | */ | 10 | */ |
| 11 | |||
| 12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 13 | |||
| 11 | #include <linux/init.h> | 14 | #include <linux/init.h> |
| 12 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
| 13 | #include <linux/module.h> | 16 | #include <linux/module.h> |
diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c index 7ff7427c2e6a..a82937e2f824 100644 --- a/drivers/rtc/rtc-m41t80.c +++ b/drivers/rtc/rtc-m41t80.c | |||
| @@ -13,6 +13,8 @@ | |||
| 13 | * | 13 | * |
| 14 | */ | 14 | */ |
| 15 | 15 | ||
| 16 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 17 | |||
| 16 | #include <linux/bcd.h> | 18 | #include <linux/bcd.h> |
| 17 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
| 18 | #include <linux/init.h> | 20 | #include <linux/init.h> |
| @@ -513,12 +515,12 @@ static int wdt_ioctl(struct file *file, unsigned int cmd, | |||
| 513 | return -EFAULT; | 515 | return -EFAULT; |
| 514 | 516 | ||
| 515 | if (rv & WDIOS_DISABLECARD) { | 517 | if (rv & WDIOS_DISABLECARD) { |
| 516 | pr_info("rtc-m41t80: disable watchdog\n"); | 518 | pr_info("disable watchdog\n"); |
| 517 | wdt_disable(); | 519 | wdt_disable(); |
| 518 | } | 520 | } |
| 519 | 521 | ||
| 520 | if (rv & WDIOS_ENABLECARD) { | 522 | if (rv & WDIOS_ENABLECARD) { |
| 521 | pr_info("rtc-m41t80: enable watchdog\n"); | 523 | pr_info("enable watchdog\n"); |
| 522 | wdt_ping(); | 524 | wdt_ping(); |
| 523 | } | 525 | } |
| 524 | 526 | ||
diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c index 9d71328e59b9..7632a87784c3 100644 --- a/drivers/rtc/rtc-max77686.c +++ b/drivers/rtc/rtc-max77686.c | |||
| @@ -12,6 +12,8 @@ | |||
| 12 | * | 12 | * |
| 13 | */ | 13 | */ |
| 14 | 14 | ||
| 15 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 16 | |||
| 15 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
| 16 | #include <linux/rtc.h> | 18 | #include <linux/rtc.h> |
| 17 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
| @@ -103,8 +105,8 @@ static int max77686_rtc_tm_to_data(struct rtc_time *tm, u8 *data) | |||
| 103 | data[RTC_YEAR] = tm->tm_year > 100 ? (tm->tm_year - 100) : 0; | 105 | data[RTC_YEAR] = tm->tm_year > 100 ? (tm->tm_year - 100) : 0; |
| 104 | 106 | ||
| 105 | if (tm->tm_year < 100) { | 107 | if (tm->tm_year < 100) { |
| 106 | pr_warn("%s: MAX77686 RTC cannot handle the year %d." | 108 | pr_warn("RTC cannot handle the year %d. Assume it's 2000.\n", |
| 107 | "Assume it's 2000.\n", __func__, 1900 + tm->tm_year); | 109 | 1900 + tm->tm_year); |
| 108 | return -EINVAL; | 110 | return -EINVAL; |
| 109 | } | 111 | } |
| 110 | return 0; | 112 | return 0; |
diff --git a/drivers/rtc/rtc-max8997.c b/drivers/rtc/rtc-max8997.c index 67fbe559d535..9e02bcda0c09 100644 --- a/drivers/rtc/rtc-max8997.c +++ b/drivers/rtc/rtc-max8997.c | |||
| @@ -12,6 +12,8 @@ | |||
| 12 | * | 12 | * |
| 13 | */ | 13 | */ |
| 14 | 14 | ||
| 15 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 16 | |||
| 15 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
| 16 | #include <linux/rtc.h> | 18 | #include <linux/rtc.h> |
| 17 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
| @@ -107,8 +109,8 @@ static int max8997_rtc_tm_to_data(struct rtc_time *tm, u8 *data) | |||
| 107 | data[RTC_YEAR] = tm->tm_year > 100 ? (tm->tm_year - 100) : 0; | 109 | data[RTC_YEAR] = tm->tm_year > 100 ? (tm->tm_year - 100) : 0; |
| 108 | 110 | ||
| 109 | if (tm->tm_year < 100) { | 111 | if (tm->tm_year < 100) { |
| 110 | pr_warn("%s: MAX8997 RTC cannot handle the year %d." | 112 | pr_warn("RTC cannot handle the year %d. Assume it's 2000.\n", |
| 111 | "Assume it's 2000.\n", __func__, 1900 + tm->tm_year); | 113 | 1900 + tm->tm_year); |
| 112 | return -EINVAL; | 114 | return -EINVAL; |
| 113 | } | 115 | } |
| 114 | return 0; | 116 | return 0; |
| @@ -424,7 +426,7 @@ static void max8997_rtc_enable_smpl(struct max8997_rtc_info *info, bool enable) | |||
| 424 | 426 | ||
| 425 | val = 0; | 427 | val = 0; |
| 426 | max8997_read_reg(info->rtc, MAX8997_RTC_WTSR_SMPL, &val); | 428 | max8997_read_reg(info->rtc, MAX8997_RTC_WTSR_SMPL, &val); |
| 427 | pr_info("%s: WTSR_SMPL(0x%02x)\n", __func__, val); | 429 | pr_info("WTSR_SMPL(0x%02x)\n", val); |
| 428 | } | 430 | } |
| 429 | 431 | ||
| 430 | static int max8997_rtc_init_reg(struct max8997_rtc_info *info) | 432 | static int max8997_rtc_init_reg(struct max8997_rtc_info *info) |
diff --git a/drivers/rtc/rtc-msm6242.c b/drivers/rtc/rtc-msm6242.c index 9bf877bdf836..c1c5c4e3b3b4 100644 --- a/drivers/rtc/rtc-msm6242.c +++ b/drivers/rtc/rtc-msm6242.c | |||
| @@ -7,6 +7,8 @@ | |||
| 7 | * Copyright (C) 1993 Hamish Macdonald | 7 | * Copyright (C) 1993 Hamish Macdonald |
| 8 | */ | 8 | */ |
| 9 | 9 | ||
| 10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 11 | |||
| 10 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
| 11 | #include <linux/io.h> | 13 | #include <linux/io.h> |
| 12 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
| @@ -111,7 +113,7 @@ static void msm6242_lock(struct msm6242_priv *priv) | |||
| 111 | } | 113 | } |
| 112 | 114 | ||
| 113 | if (!cnt) | 115 | if (!cnt) |
| 114 | pr_warn("msm6242: timed out waiting for RTC (0x%x)\n", | 116 | pr_warn("timed out waiting for RTC (0x%x)\n", |
| 115 | msm6242_read(priv, MSM6242_CD)); | 117 | msm6242_read(priv, MSM6242_CD)); |
| 116 | } | 118 | } |
| 117 | 119 | ||
diff --git a/drivers/rtc/rtc-opal.c b/drivers/rtc/rtc-opal.c index 95f652165fe9..7061dcae2b09 100644 --- a/drivers/rtc/rtc-opal.c +++ b/drivers/rtc/rtc-opal.c | |||
| @@ -16,8 +16,9 @@ | |||
| 16 | * along with this program. | 16 | * along with this program. |
| 17 | */ | 17 | */ |
| 18 | 18 | ||
| 19 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 20 | |||
| 19 | #define DRVNAME "rtc-opal" | 21 | #define DRVNAME "rtc-opal" |
| 20 | #define pr_fmt(fmt) DRVNAME ": " fmt | ||
| 21 | 22 | ||
| 22 | #include <linux/module.h> | 23 | #include <linux/module.h> |
| 23 | #include <linux/err.h> | 24 | #include <linux/err.h> |
diff --git a/drivers/rtc/rtc-s5m.c b/drivers/rtc/rtc-s5m.c index f0cb0ecb3d8d..64baad379174 100644 --- a/drivers/rtc/rtc-s5m.c +++ b/drivers/rtc/rtc-s5m.c | |||
| @@ -15,6 +15,8 @@ | |||
| 15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 19 | |||
| 18 | #include <linux/module.h> | 20 | #include <linux/module.h> |
| 19 | #include <linux/i2c.h> | 21 | #include <linux/i2c.h> |
| 20 | #include <linux/bcd.h> | 22 | #include <linux/bcd.h> |
| @@ -146,7 +148,7 @@ static int s5m8767_tm_to_data(struct rtc_time *tm, u8 *data) | |||
| 146 | data[RTC_YEAR1] = tm->tm_year > 100 ? (tm->tm_year - 100) : 0; | 148 | data[RTC_YEAR1] = tm->tm_year > 100 ? (tm->tm_year - 100) : 0; |
| 147 | 149 | ||
| 148 | if (tm->tm_year < 100) { | 150 | if (tm->tm_year < 100) { |
| 149 | pr_err("s5m8767 RTC cannot handle the year %d.\n", | 151 | pr_err("RTC cannot handle the year %d\n", |
| 150 | 1900 + tm->tm_year); | 152 | 1900 + tm->tm_year); |
| 151 | return -EINVAL; | 153 | return -EINVAL; |
| 152 | } else { | 154 | } else { |
diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c index 5baea3f54926..2dc787dc06c1 100644 --- a/drivers/rtc/rtc-twl.c +++ b/drivers/rtc/rtc-twl.c | |||
| @@ -18,6 +18,8 @@ | |||
| 18 | * 2 of the License, or (at your option) any later version. | 18 | * 2 of the License, or (at your option) any later version. |
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 22 | |||
| 21 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
| 22 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
| 23 | #include <linux/init.h> | 25 | #include <linux/init.h> |
| @@ -145,8 +147,7 @@ static int twl_rtc_read_u8(u8 *data, u8 reg) | |||
| 145 | 147 | ||
| 146 | ret = twl_i2c_read_u8(TWL_MODULE_RTC, data, (rtc_reg_map[reg])); | 148 | ret = twl_i2c_read_u8(TWL_MODULE_RTC, data, (rtc_reg_map[reg])); |
| 147 | if (ret < 0) | 149 | if (ret < 0) |
| 148 | pr_err("twl_rtc: Could not read TWL" | 150 | pr_err("Could not read TWL register %X - error %d\n", reg, ret); |
| 149 | "register %X - error %d\n", reg, ret); | ||
| 150 | return ret; | 151 | return ret; |
| 151 | } | 152 | } |
| 152 | 153 | ||
| @@ -159,8 +160,8 @@ static int twl_rtc_write_u8(u8 data, u8 reg) | |||
| 159 | 160 | ||
| 160 | ret = twl_i2c_write_u8(TWL_MODULE_RTC, data, (rtc_reg_map[reg])); | 161 | ret = twl_i2c_write_u8(TWL_MODULE_RTC, data, (rtc_reg_map[reg])); |
| 161 | if (ret < 0) | 162 | if (ret < 0) |
| 162 | pr_err("twl_rtc: Could not write TWL" | 163 | pr_err("Could not write TWL register %X - error %d\n", |
| 163 | "register %X - error %d\n", reg, ret); | 164 | reg, ret); |
| 164 | return ret; | 165 | return ret; |
| 165 | } | 166 | } |
| 166 | 167 | ||
