]> xenbits.xensource.com Git - people/jgross/linux.git/commitdiff
rtc: pcf8523: remove unnecessary OR operation
authorJavier Carrasco <javier.carrasco@wolfvision.net>
Wed, 15 Mar 2023 08:20:21 +0000 (09:20 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 17 Mar 2023 22:23:54 +0000 (23:23 +0100)
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>
drivers/rtc/rtc-pcf8523.c

index ccb5aa6904335550385557badcaf79efab5ead82..e7115ebef70771e2ae8db1641b72e90320e0bd1f 100644 (file)
@@ -65,7 +65,7 @@ static int pcf8523_load_capacitance(struct pcf8523 *pcf8523, struct device_node
                         load);
                fallthrough;
        case 12500:
-               value |= PCF8523_CONTROL1_CAP_SEL;
+               value = PCF8523_CONTROL1_CAP_SEL;
                break;
        case 7000:
                break;