Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clocksource/drivers/samsung_pwm: Constify passed structure

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

authored by

Krzysztof Kozlowski and committed by
Daniel Lezcano
bb08e965 a0143f5a

+2 -2
+1 -1
drivers/clocksource/samsung_pwm_timer.c
··· 401 401 402 402 void __init samsung_pwm_clocksource_init(void __iomem *base, 403 403 unsigned int *irqs, 404 - struct samsung_pwm_variant *variant) 404 + const struct samsung_pwm_variant *variant) 405 405 { 406 406 pwm.base = base; 407 407 memcpy(&pwm.variant, variant, sizeof(pwm.variant));
+1 -1
include/clocksource/samsung_pwm.h
··· 28 28 29 29 void samsung_pwm_clocksource_init(void __iomem *base, 30 30 unsigned int *irqs, 31 - struct samsung_pwm_variant *variant); 31 + const struct samsung_pwm_variant *variant); 32 32 33 33 #endif /* __CLOCKSOURCE_SAMSUNG_PWM_H */