forked from Minki/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
This commit is contained in:
parent
a0143f5ac0
commit
bb08e96575
@ -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));
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user