aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ds1347.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2019-10-07 15:47:17 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2019-10-07 15:49:26 +0200
commit1d84eca6d5b320b9c0a2f7c107aac40bb8989785 (patch)
tree43fef8f323c040fdc935d6e02eb40940279a0f1f /drivers/rtc/rtc-ds1347.c
parent590062f479312aecc0eb88900cdc4983a7cc56f5 (diff)
downloadlinux-1d84eca6d5b320b9c0a2f7c107aac40bb8989785.tar.gz
rtc: ds1347: remove useless read
DS1347_SECONDS_REG is read at probe time but the value is simply discarded. Remove that useless read. Link: https://lore.kernel.org/r/20191007134724.15505-3-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-ds1347.c')
-rw-r--r--drivers/rtc/rtc-ds1347.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-ds1347.c b/drivers/rtc/rtc-ds1347.c
index ab5533c7f99d4..013c5df137658 100644
--- a/drivers/rtc/rtc-ds1347.c
+++ b/drivers/rtc/rtc-ds1347.c
@@ -102,7 +102,6 @@ static int ds1347_probe(struct spi_device *spi)
struct regmap_config config;
struct regmap *map;
unsigned int data;
- int res;
memset(&config, 0, sizeof(config));
config.reg_bits = 8;
@@ -125,11 +124,6 @@ static int ds1347_probe(struct spi_device *spi)
spi_set_drvdata(spi, map);
- /* RTC Settings */
- res = regmap_read(map, DS1347_SECONDS_REG, &data);
- if (res)
- return res;
-
/* Disable the write protect of rtc */
regmap_read(map, DS1347_CONTROL_REG, &data);
data = data & ~(1<<7);