]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
rtc: ds1347: remove useless read
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 7 Oct 2019 13:47:17 +0000 (15:47 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 7 Oct 2019 13:49:26 +0000 (15:49 +0200)
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>
drivers/rtc/rtc-ds1347.c

index ab5533c7f99d4a15a2939e0b25705b8d233d0888..013c5df137658d64b03053591f318d5a2d66bce3 100644 (file)
@@ -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);