Commit bb08e965 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Daniel Lezcano
Browse files

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: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210506202729.157260-2-krzysztof.kozlowski@canonical.com
parent a0143f5a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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));
+1 −1
Original line number Diff line number Diff line
@@ -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 */