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
This commit is contained in:
Krzysztof Kozlowski 2021-05-06 16:27:26 -04:00 committed by Daniel Lezcano
parent a0143f5ac0
commit bb08e96575
2 changed files with 2 additions and 2 deletions

View 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));

View 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 */