clocksource/drivers/samsung_pwm: Constify passed structure
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Thu, 6 May 2021 20:27:26 +0000 (16:27 -0400)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Fri, 4 Jun 2021 08:12:11 +0000 (10:12 +0200)
The 'struct samsung_pwm_variant' argument passed to initialization
functions is not modified, so it can be made const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210506202729.157260-2-krzysztof.kozlowski@canonical.com
drivers/clocksource/samsung_pwm_timer.c
include/clocksource/samsung_pwm.h

index 69bf79c7f462fc20f8e74e1536e626dccf554ecb..bfad61b509f93d6100e111b49120a13deebde262 100644 (file)
@@ -401,7 +401,7 @@ static int __init _samsung_pwm_clocksource_init(void)
 
 void __init samsung_pwm_clocksource_init(void __iomem *base,
                                         unsigned int *irqs,
-                                        struct samsung_pwm_variant *variant)
+                                        const struct samsung_pwm_variant *variant)
 {
        pwm.base = base;
        memcpy(&pwm.variant, variant, sizeof(pwm.variant));
index 76341988fb4f2d3fcdc5b6b7e5420d5619dc9142..9b435caa95fef50606f6a3722fa546437c3e9078 100644 (file)
@@ -28,6 +28,6 @@ struct samsung_pwm_variant {
 
 void samsung_pwm_clocksource_init(void __iomem *base,
                                  unsigned int *irqs,
-                                 struct samsung_pwm_variant *variant);
+                                 const struct samsung_pwm_variant *variant);
 
 #endif /* __CLOCKSOURCE_SAMSUNG_PWM_H */