summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-09-22 11:05:43 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-09-22 11:05:43 -0700
commit9dbd83f665298c9dcf647f20d6d6488e9019114b (patch)
tree538712c8f87137989743b22fb4a4ad4345e80572 /drivers/rtc
parent379bb045171dea3e2ee01b32fe88f2afe1fe2fa8 (diff)
parentb99a3120f9a30e1429d8d634e18da8dff93340c6 (diff)
downloadlinux-9dbd83f665298c9dcf647f20d6d6488e9019114b.tar.gz
linux-9dbd83f665298c9dcf647f20d6d6488e9019114b.tar.bz2
linux-9dbd83f665298c9dcf647f20d6d6488e9019114b.zip
Merge tag 'rtc-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC updates from Alexandre Belloni: "Two new drivers and the new pcf2127 feature make the bulk of the additions. The rest are the usual fixes and new features. Subsystem: - add debug message when registration fails New drivers: - Amlogic Virtual Wake - Freescale FlexTimer Module alarm Drivers: - remove superfluous error messages - convert to i2c_new_dummy_device and devm_i2c_new_dummy_device - Remove dev_err() usage after platform_get_irq() - Set RTC range for: pcf2123, pcf8563, snvs. - pcf2127: tamper detection and watchdog support - pcf85363: fix regmap issue - sun6i: H6 support - remove w90x900/nuc900 driver" * tag 'rtc-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (51 commits) rtc: meson: mark PM functions as __maybe_unused rtc: sc27xx: Remove clearing SPRD_RTC_POWEROFF_ALM_FLAG flag dt-bindings: rtc: ds1307: add rx8130 compatible rtc: sun6i: Allow using as wakeup source from suspend rtc: pcf8563: let the core handle range offsetting rtc: pcf8563: remove useless indirection rtc: pcf8563: convert to devm_rtc_allocate_device rtc: pcf8563: add Microcrystal RV8564 compatible rtc: pcf8563: add Epson RTC8564 compatible rtc: s35390a: convert to devm_i2c_new_dummy_device() rtc: max77686: convert to devm_i2c_new_dummy_device() rtc: pcf85363/pcf85263: fix regmap error in set_time rtc: snvs: switch to rtc_time64_to_tm/rtc_tm_to_time64 rtc: snvs: set range rtc: snvs: fix possible race condition rtc: pcf2127: bugfix: watchdog build dependency rtc: pcf2127: add tamper detection support rtc: pcf2127: add watchdog feature support rtc: pcf2127: bugfix: read rtc disables watchdog rtc: pcf2127: cleanup register and bit defines ...
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/Kconfig42
-rw-r--r--drivers/rtc/Makefile3
-rw-r--r--drivers/rtc/class.c4
-rw-r--r--drivers/rtc/rtc-88pm80x.c6
-rw-r--r--drivers/rtc/rtc-88pm860x.c4
-rw-r--r--drivers/rtc/rtc-ab-eoz9.c24
-rw-r--r--drivers/rtc/rtc-ac100.c14
-rw-r--r--drivers/rtc/rtc-armada38x.c12
-rw-r--r--drivers/rtc/rtc-asm9260.c4
-rw-r--r--drivers/rtc/rtc-aspeed.c7
-rw-r--r--drivers/rtc/rtc-at91rm9200.c4
-rw-r--r--drivers/rtc/rtc-at91sam9.c4
-rw-r--r--drivers/rtc/rtc-bd70528.c11
-rw-r--r--drivers/rtc/rtc-brcmstb-waketimer.c4
-rw-r--r--drivers/rtc/rtc-cadence.c13
-rw-r--r--drivers/rtc/rtc-davinci.c4
-rw-r--r--drivers/rtc/rtc-ds1305.c7
-rw-r--r--drivers/rtc/rtc-ds1672.c3
-rw-r--r--drivers/rtc/rtc-fsl-ftm-alarm.c337
-rw-r--r--drivers/rtc/rtc-imx-sc.c4
-rw-r--r--drivers/rtc/rtc-imxdi.c4
-rw-r--r--drivers/rtc/rtc-isl12026.c6
-rw-r--r--drivers/rtc/rtc-jz4740.c8
-rw-r--r--drivers/rtc/rtc-max77686.c26
-rw-r--r--drivers/rtc/rtc-meson-vrtc.c155
-rw-r--r--drivers/rtc/rtc-mt6397.c4
-rw-r--r--drivers/rtc/rtc-mt7622.c1
-rw-r--r--drivers/rtc/rtc-mxc.c5
-rw-r--r--drivers/rtc/rtc-mxc_v2.c4
-rw-r--r--drivers/rtc/rtc-nuc900.c271
-rw-r--r--drivers/rtc/rtc-pcf2123.c136
-rw-r--r--drivers/rtc/rtc-pcf2127.c380
-rw-r--r--drivers/rtc/rtc-pcf85363.c7
-rw-r--r--drivers/rtc/rtc-pcf8563.c48
-rw-r--r--drivers/rtc/rtc-pic32.c4
-rw-r--r--drivers/rtc/rtc-pm8xxx.c4
-rw-r--r--drivers/rtc/rtc-puv3.c12
-rw-r--r--drivers/rtc/rtc-pxa.c8
-rw-r--r--drivers/rtc/rtc-rk808.c6
-rw-r--r--drivers/rtc/rtc-rv3028.c3
-rw-r--r--drivers/rtc/rtc-rv3029c2.c16
-rw-r--r--drivers/rtc/rtc-rv8803.c3
-rw-r--r--drivers/rtc/rtc-s35390a.c56
-rw-r--r--drivers/rtc/rtc-s3c.c8
-rw-r--r--drivers/rtc/rtc-s5m.c6
-rw-r--r--drivers/rtc/rtc-sc27xx.c7
-rw-r--r--drivers/rtc/rtc-sd3078.c4
-rw-r--r--drivers/rtc/rtc-snvs.c25
-rw-r--r--drivers/rtc/rtc-spear.c4
-rw-r--r--drivers/rtc/rtc-stm32.c1
-rw-r--r--drivers/rtc/rtc-sun6i.c74
-rw-r--r--drivers/rtc/rtc-sunxi.c14
-rw-r--r--drivers/rtc/rtc-tegra.c8
-rw-r--r--drivers/rtc/rtc-tps6586x.c5
-rw-r--r--drivers/rtc/rtc-tps65910.c8
-rw-r--r--drivers/rtc/rtc-vt8500.c4
-rw-r--r--drivers/rtc/rtc-xgene.c4
-rw-r--r--drivers/rtc/rtc-zynqmp.c8
58 files changed, 1136 insertions, 722 deletions
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index a45175fd8cc4..1adf9f815652 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -373,6 +373,17 @@ config RTC_DRV_MAX77686
This driver can also be built as a module. If so, the module
will be called rtc-max77686.
+config RTC_DRV_MESON_VRTC
+ tristate "Amlogic Meson Virtual RTC"
+ depends on ARCH_MESON || COMPILE_TEST
+ default m if ARCH_MESON
+ help
+ If you say yes here you will get support for the
+ Virtual RTC of Amlogic SoCs.
+
+ This driver can also be built as a module. If so, the module
+ will be called rtc-meson-vrtc.
+
config RTC_DRV_RK808
tristate "Rockchip RK805/RK808/RK809/RK817/RK818 RTC"
depends on MFD_RK808
@@ -500,6 +511,7 @@ config RTC_DRV_M41T80_WDT
watchdog timer in the ST M41T60 and M41T80 RTC chips series.
config RTC_DRV_BD70528
tristate "ROHM BD70528 PMIC RTC"
+ depends on MFD_ROHM_BD70528 && (BD70528_WATCHDOG || !BD70528_WATCHDOG)
help
If you say Y here you will get support for the RTC
on ROHM BD70528 Power Management IC.
@@ -874,9 +886,15 @@ config RTC_DRV_DS3232_HWMON
config RTC_DRV_PCF2127
tristate "NXP PCF2127"
depends on RTC_I2C_AND_SPI
+ select WATCHDOG_CORE if WATCHDOG
help
If you say yes here you get support for the NXP PCF2127/29 RTC
- chips.
+ chips with integrated quartz crystal for industrial applications.
+ Both chips also have watchdog timer and tamper switch detection
+ features.
+
+ PCF2127 has an additional feature of 512 bytes battery backed
+ memory that's accessible using nvmem interface.
This driver can also be built as a module. If so, the module
will be called rtc-pcf2127.
@@ -1247,13 +1265,6 @@ config RTC_DRV_AB8500
Select this to enable the ST-Ericsson AB8500 power management IC RTC
support. This chip contains a battery- and capacitor-backed RTC.
-config RTC_DRV_NUC900
- tristate "NUC910/NUC920 RTC driver"
- depends on ARCH_W90X900 || COMPILE_TEST
- help
- If you say yes here you get support for the RTC subsystem of the
- NUC910/NUC920 used in embedded systems.
-
config RTC_DRV_OPAL
tristate "IBM OPAL RTC driver"
depends on PPC_POWERNV
@@ -1323,6 +1334,21 @@ config RTC_DRV_IMXDI
This driver can also be built as a module, if so, the module
will be called "rtc-imxdi".
+config RTC_DRV_FSL_FTM_ALARM
+ tristate "Freescale FlexTimer alarm timer"
+ depends on ARCH_LAYERSCAPE || SOC_LS1021A
+ select FSL_RCPM
+ default y
+ help
+ For the FlexTimer in LS1012A, LS1021A, LS1028A, LS1043A, LS1046A,
+ LS1088A, LS208xA, we can use FTM as the wakeup source.
+
+ Say y here to enable FTM alarm support. The FTM alarm provides
+ alarm functions for wakeup system from deep sleep.
+
+ This driver can also be built as a module, if so, the module
+ will be called "rtc-fsl-ftm-alarm".
+
config RTC_DRV_MESON
tristate "Amlogic Meson RTC"
depends on (ARM && ARCH_MESON) || COMPILE_TEST
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 6b09c21dc1b6..4ac8f19fb631 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -73,6 +73,7 @@ obj-$(CONFIG_RTC_DRV_EFI) += rtc-efi.o
obj-$(CONFIG_RTC_DRV_EM3027) += rtc-em3027.o
obj-$(CONFIG_RTC_DRV_EP93XX) += rtc-ep93xx.o
obj-$(CONFIG_RTC_DRV_FM3130) += rtc-fm3130.o
+obj-$(CONFIG_RTC_DRV_FSL_FTM_ALARM) += rtc-fsl-ftm-alarm.o
obj-$(CONFIG_RTC_DRV_FTRTC010) += rtc-ftrtc010.o
obj-$(CONFIG_RTC_DRV_GENERIC) += rtc-generic.o
obj-$(CONFIG_RTC_DRV_GOLDFISH) += rtc-goldfish.o
@@ -102,6 +103,7 @@ obj-$(CONFIG_RTC_DRV_MAX8907) += rtc-max8907.o
obj-$(CONFIG_RTC_DRV_MAX8925) += rtc-max8925.o
obj-$(CONFIG_RTC_DRV_MAX8997) += rtc-max8997.o
obj-$(CONFIG_RTC_DRV_MAX8998) += rtc-max8998.o
+obj-$(CONFIG_RTC_DRV_MESON_VRTC)+= rtc-meson-vrtc.o
obj-$(CONFIG_RTC_DRV_MC13XXX) += rtc-mc13xxx.o
obj-$(CONFIG_RTC_DRV_MCP795) += rtc-mcp795.o
obj-$(CONFIG_RTC_DRV_MESON) += rtc-meson.o
@@ -113,7 +115,6 @@ obj-$(CONFIG_RTC_DRV_MT7622) += rtc-mt7622.o
obj-$(CONFIG_RTC_DRV_MV) += rtc-mv.o
obj-$(CONFIG_RTC_DRV_MXC) += rtc-mxc.o
obj-$(CONFIG_RTC_DRV_MXC_V2) += rtc-mxc_v2.o
-obj-$(CONFIG_RTC_DRV_NUC900) += rtc-nuc900.o
obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o
obj-$(CONFIG_RTC_DRV_OPAL) += rtc-opal.o
obj-$(CONFIG_RTC_DRV_PALMAS) += rtc-palmas.o
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c
index 0f492b0940b3..9458e6d6686a 100644
--- a/drivers/rtc/class.c
+++ b/drivers/rtc/class.c
@@ -346,8 +346,10 @@ int __rtc_register_device(struct module *owner, struct rtc_device *rtc)
struct rtc_wkalrm alrm;
int err;
- if (!rtc->ops)
+ if (!rtc->ops) {
+ dev_dbg(&rtc->dev, "no ops set\n");
return -EINVAL;
+ }
rtc->owner = owner;
rtc_device_get_offset(rtc);
diff --git a/drivers/rtc/rtc-88pm80x.c b/drivers/rtc/rtc-88pm80x.c
index e4d5a19fd1c9..75779e8501a3 100644
--- a/drivers/rtc/rtc-88pm80x.c
+++ b/drivers/rtc/rtc-88pm80x.c
@@ -264,7 +264,6 @@ static int pm80x_rtc_probe(struct platform_device *pdev)
return -ENOMEM;
info->irq = platform_get_irq(pdev, 0);
if (info->irq < 0) {
- dev_err(&pdev->dev, "No IRQ resource!\n");
ret = -EINVAL;
goto out;
}
@@ -296,10 +295,9 @@ static int pm80x_rtc_probe(struct platform_device *pdev)
info->rtc_dev->range_max = U32_MAX;
ret = rtc_register_device(info->rtc_dev);
- if (ret) {
- dev_err(&pdev->dev, "Failed to register RTC device: %d\n", ret);
+ if (ret)
goto out_rtc;
- }
+
/*
* enable internal XO instead of internal 3.25MHz clock since it can
* free running in PMIC power-down state.
diff --git a/drivers/rtc/rtc-88pm860x.c b/drivers/rtc/rtc-88pm860x.c
index 434285f495e0..4743b16a8d84 100644
--- a/drivers/rtc/rtc-88pm860x.c
+++ b/drivers/rtc/rtc-88pm860x.c
@@ -328,10 +328,8 @@ static int pm860x_rtc_probe(struct platform_device *pdev)
if (!info)
return -ENOMEM;
info->irq = platform_get_irq(pdev, 0);
- if (info->irq < 0) {
- dev_err(&pdev->dev, "No IRQ resource!\n");
+ if (info->irq < 0)
return info->irq;
- }
info->chip = chip;
info->i2c = (chip->id == CHIP_PM8607) ? chip->client : chip->companion;
diff --git a/drivers/rtc/rtc-ab-eoz9.c b/drivers/rtc/rtc-ab-eoz9.c
index e4f6e0061ccf..d690985caa4c 100644
--- a/drivers/rtc/rtc-ab-eoz9.c
+++ b/drivers/rtc/rtc-ab-eoz9.c
@@ -390,35 +390,31 @@ static int abeoz9_probe(struct i2c_client *client,
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C |
I2C_FUNC_SMBUS_BYTE_DATA |
- I2C_FUNC_SMBUS_I2C_BLOCK)) {
- ret = -ENODEV;
- goto err;
- }
+ I2C_FUNC_SMBUS_I2C_BLOCK))
+ return -ENODEV;
regmap = devm_regmap_init_i2c(client, &abeoz9_rtc_regmap_config);
if (IS_ERR(regmap)) {
ret = PTR_ERR(regmap);
dev_err(dev, "regmap allocation failed: %d\n", ret);
- goto err;
+ return ret;
}
data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
- if (!data) {
- ret = -ENOMEM;
- goto err;
- }
+ if (!data)
+ return -ENOMEM;
data->regmap = regmap;
dev_set_drvdata(dev, data);
ret = abeoz9_rtc_setup(dev, client->dev.of_node);
if (ret)
- goto err;
+ return ret;
data->rtc = devm_rtc_allocate_device(dev);
ret = PTR_ERR_OR_ZERO(data->rtc);
if (ret)
- goto err;
+ return ret;
data->rtc->ops = &rtc_ops;
data->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
@@ -426,14 +422,10 @@ static int abeoz9_probe(struct i2c_client *client,
ret = rtc_register_device(data->rtc);
if (ret)
- goto err;
+ return ret;
abeoz9_hwmon_register(dev, data);
return 0;
-
-err:
- dev_err(dev, "unable to register RTC device (%d)\n", ret);
- return ret;
}
#ifdef CONFIG_OF
diff --git a/drivers/rtc/rtc-ac100.c b/drivers/rtc/rtc-ac100.c
index 2e5a8b15b222..29223931aba7 100644
--- a/drivers/rtc/rtc-ac100.c
+++ b/drivers/rtc/rtc-ac100.c
@@ -578,10 +578,8 @@ static int ac100_rtc_probe(struct platform_device *pdev)
chip->regmap = ac100->regmap;
chip->irq = platform_get_irq(pdev, 0);
- if (chip->irq < 0) {
- dev_err(&pdev->dev, "No IRQ resource\n");
+ if (chip->irq < 0)
return chip->irq;
- }
chip->rtc = devm_rtc_allocate_device(&pdev->dev);
if (IS_ERR(chip->rtc))
@@ -612,15 +610,7 @@ static int ac100_rtc_probe(struct platform_device *pdev)
if (ret)
return ret;
- ret = rtc_register_device(chip->rtc);
- if (ret) {
- dev_err(&pdev->dev, "unable to register device\n");
- return ret;
- }
-
- dev_info(&pdev->dev, "RTC enabled\n");
-
- return 0;
+ return rtc_register_device(chip->rtc);
}
static int ac100_rtc_remove(struct platform_device *pdev)
diff --git a/drivers/rtc/rtc-armada38x.c b/drivers/rtc/rtc-armada38x.c
index 19d6980e90fb..9351bd52477e 100644
--- a/drivers/rtc/rtc-armada38x.c
+++ b/drivers/rtc/rtc-armada38x.c
@@ -502,7 +502,6 @@ static __init int armada38x_rtc_probe(struct platform_device *pdev)
struct resource *res;
struct armada38x_rtc *rtc;
const struct of_device_id *match;
- int ret;
match = of_match_device(armada38x_rtc_of_match_table, &pdev->dev);
if (!match)
@@ -530,11 +529,8 @@ static __init int armada38x_rtc_probe(struct platform_device *pdev)
return PTR_ERR(rtc->regs_soc);
rtc->irq = platform_get_irq(pdev, 0);
-
- if (rtc->irq < 0) {
- dev_err(&pdev->dev, "no irq\n");
+ if (rtc->irq < 0)
return rtc->irq;
- }
rtc->rtc_dev = devm_rtc_allocate_device(&pdev->dev);
if (IS_ERR(rtc->rtc_dev))
@@ -564,11 +560,7 @@ static __init int armada38x_rtc_probe(struct platform_device *pdev)
rtc->rtc_dev->range_max = U32_MAX;
- ret = rtc_register_device(rtc->rtc_dev);
- if (ret)
- dev_err(&pdev->dev, "Failed to register RTC device: %d\n", ret);
-
- return ret;
+ return rtc_register_device(rtc->rtc_dev);
}
#ifdef CONFIG_PM_SLEEP
diff --git a/drivers/rtc/rtc-asm9260.c b/drivers/rtc/rtc-asm9260.c
index d45a44936308..10413d803caa 100644
--- a/drivers/rtc/rtc-asm9260.c
+++ b/drivers/rtc/rtc-asm9260.c
@@ -257,10 +257,8 @@ static int asm9260_rtc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, priv);
irq_alarm = platform_get_irq(pdev, 0);
- if (irq_alarm < 0) {
- dev_err(dev, "No alarm IRQ resource defined\n");
+ if (irq_alarm < 0)
return irq_alarm;
- }
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
priv->iobase = devm_ioremap_resource(dev, res);
diff --git a/drivers/rtc/rtc-aspeed.c b/drivers/rtc/rtc-aspeed.c
index af3eb676d7c3..e351d35b29a3 100644
--- a/drivers/rtc/rtc-aspeed.c
+++ b/drivers/rtc/rtc-aspeed.c
@@ -86,7 +86,6 @@ static int aspeed_rtc_probe(struct platform_device *pdev)
{
struct aspeed_rtc *rtc;
struct resource *res;
- int ret;
rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL);
if (!rtc)
@@ -107,11 +106,7 @@ static int aspeed_rtc_probe(struct platform_device *pdev)
rtc->rtc_dev->range_min = RTC_TIMESTAMP_BEGIN_1900;
rtc->rtc_dev->range_max = 38814989399LL; /* 3199-12-31 23:59:59 */
- ret = rtc_register_device(rtc->rtc_dev);
- if (ret)
- return ret;
-
- return 0;
+ return rtc_register_device(rtc->rtc_dev);
}
static const struct of_device_id aspeed_rtc_match[] = {
diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c
index 82a54e93ff04..d119c6e6353e 100644
--- a/drivers/rtc/rtc-at91rm9200.c
+++ b/drivers/rtc/rtc-at91rm9200.c
@@ -378,10 +378,8 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
}
irq = platform_get_irq(pdev, 0);
- if (irq < 0) {
- dev_err(&pdev->dev, "no irq resource defined\n");
+ if (irq < 0)
return -ENXIO;
- }
at91_rtc_regs = devm_ioremap(&pdev->dev, regs->start,
resource_size(regs));
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
index 4daf3789b978..bb3ba7bfe6a5 100644
--- a/drivers/rtc/rtc-at91sam9.c
+++ b/drivers/rtc/rtc-at91sam9.c
@@ -342,10 +342,8 @@ static int at91_rtc_probe(struct platform_device *pdev)
struct of_phandle_args args;
irq = platform_get_irq(pdev, 0);
- if (irq < 0) {
- dev_err(&pdev->dev, "failed to get interrupt resource\n");
+ if (irq < 0)
return irq;
- }
rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL);
if (!rtc)
diff --git a/drivers/rtc/rtc-bd70528.c b/drivers/rtc/rtc-bd70528.c
index f9bdd555e1a2..7744333b0f40 100644
--- a/drivers/rtc/rtc-bd70528.c
+++ b/drivers/rtc/rtc-bd70528.c
@@ -416,11 +416,8 @@ static int bd70528_probe(struct platform_device *pdev)
bd_rtc->dev = &pdev->dev;
irq = platform_get_irq_byname(pdev, "bd70528-rtc-alm");
-
- if (irq < 0) {
- dev_err(&pdev->dev, "Failed to get irq\n");
+ if (irq < 0)
return irq;
- }
platform_set_drvdata(pdev, bd_rtc);
@@ -479,11 +476,7 @@ static int bd70528_probe(struct platform_device *pdev)
return ret;
}
- ret = rtc_register_device(rtc);
- if (ret)
- dev_err(&pdev->dev, "Registering RTC failed\n");
-
- return ret;
+ return rtc_register_device(rtc);
}
static struct platform_driver bd70528_rtc = {
diff --git a/drivers/rtc/rtc-brcmstb-waketimer.c b/drivers/rtc/rtc-brcmstb-waketimer.c
index 2f65943867f5..3e9800f9878a 100644
--- a/drivers/rtc/rtc-brcmstb-waketimer.c
+++ b/drivers/rtc/rtc-brcmstb-waketimer.c
@@ -255,10 +255,8 @@ static int brcmstb_waketmr_probe(struct platform_device *pdev)
timer->rtc->range_max = U32_MAX;
ret = rtc_register_device(timer->rtc);
- if (ret) {
- dev_err(dev, "unable to register device\n");
+ if (ret)
goto err_notifier;
- }
dev_info(dev, "registered, with irq %d\n", timer->irq);
diff --git a/drivers/rtc/rtc-cadence.c b/drivers/rtc/rtc-cadence.c
index 3b7d643c8a63..592aae23cbaf 100644
--- a/drivers/rtc/rtc-cadence.c
+++ b/drivers/rtc/rtc-cadence.c
@@ -289,12 +289,8 @@ static int cdns_rtc_probe(struct platform_device *pdev)
}
crtc->rtc_dev = devm_rtc_allocate_device(&pdev->dev);
- if (IS_ERR(crtc->rtc_dev)) {
- ret = PTR_ERR(crtc->rtc_dev);
- dev_err(&pdev->dev,
- "Failed to allocate the RTC device, %d\n", ret);
- return ret;
- }
+ if (IS_ERR(crtc->rtc_dev))
+ return PTR_ERR(crtc->rtc_dev);
platform_set_drvdata(pdev, crtc);
@@ -343,11 +339,8 @@ static int cdns_rtc_probe(struct platform_device *pdev)
writel(CDNS_RTC_KRTCR_KRTC, crtc->regs + CDNS_RTC_KRTCR);
ret = rtc_register_device(crtc->rtc_dev);
- if (ret) {
- dev_err(&pdev->dev,
- "Failed to register the RTC device, %d\n", ret);
+ if (ret)
goto err_disable_wakeup;
- }
return 0;
diff --git a/drivers/rtc/rtc-davinci.c b/drivers/rtc/rtc-davinci.c
index fcb71bf4d492..d8e0db2e7fc6 100644
--- a/drivers/rtc/rtc-davinci.c
+++ b/drivers/rtc/rtc-davinci.c
@@ -477,10 +477,8 @@ static int __init davinci_rtc_probe(struct platform_device *pdev)
return -ENOMEM;
davinci_rtc->irq = platform_get_irq(pdev, 0);
- if (davinci_rtc->irq < 0) {
- dev_err(dev, "no RTC irq\n");
+ if (davinci_rtc->irq < 0)
return davinci_rtc->irq;
- }
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
davinci_rtc->base = devm_ioremap_resource(dev, res);
diff --git a/drivers/rtc/rtc-ds1305.c b/drivers/rtc/rtc-ds1305.c
index e04d6e862c42..4420fbf2f8fe 100644
--- a/drivers/rtc/rtc-ds1305.c
+++ b/drivers/rtc/rtc-ds1305.c
@@ -690,19 +690,16 @@ static int ds1305_probe(struct spi_device *spi)
/* register RTC ... from here on, ds1305->ctrl needs locking */
ds1305->rtc = devm_rtc_allocate_device(&spi->dev);
- if (IS_ERR(ds1305->rtc)) {
+ if (IS_ERR(ds1305->rtc))
return PTR_ERR(ds1305->rtc);
- }
ds1305->rtc->ops = &ds1305_ops;
ds1305_nvmem_cfg.priv = ds1305;
ds1305->rtc