Skip to content

Commit dc87fad

Browse files
JC-WValexandrebelloni
authored andcommitted
rtc: pcf8523: remove unnecessary OR operation
The value variable is initialized to 0 and it is not used to set any other bits rather than the one that defines the capacitor value. Setting this capacitor value is the only purpose of the function where the variable is defined and therefore the OR operation does not apply as a way to foresee functionality extensions either. Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net> Link: https://lore.kernel.org/r/20230315082021.2104452-3-javier.carrasco@wolfvision.net Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent b48cc75 commit dc87fad

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/rtc/rtc-pcf8523.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static int pcf8523_load_capacitance(struct pcf8523 *pcf8523, struct device_node
6565
load);
6666
fallthrough;
6767
case 12500:
68-
value |= PCF8523_CONTROL1_CAP_SEL;
68+
value = PCF8523_CONTROL1_CAP_SEL;
6969
break;
7070
case 7000:
7171
break;

0 commit comments

Comments
 (0)