mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
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>
This commit is contained in:
parent
590062f479
commit
1d84eca6d5
1 changed files with 0 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue