lkml.org 
[lkml]   [2019]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 03/10] rtc: ds1347: remove useless read
Date
DS1347_SECONDS_REG is read at probe time but the value is simply discarded.
Remove that useless read.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
drivers/rtc/rtc-ds1347.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/drivers/rtc/rtc-ds1347.c b/drivers/rtc/rtc-ds1347.c
index ab5533c7f99d..013c5df13765 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);
--
2.21.0
\
 
 \ /
  Last update: 2019-10-07 15:48    [W:0.063 / U:10.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site