Skip to content

Commit bb08e96

Browse files
krzkdlezcano
authored andcommitted
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
1 parent a0143f5 commit bb08e96

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/clocksource/samsung_pwm_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ static int __init _samsung_pwm_clocksource_init(void)
401401

402402
void __init samsung_pwm_clocksource_init(void __iomem *base,
403403
unsigned int *irqs,
404-
struct samsung_pwm_variant *variant)
404+
const struct samsung_pwm_variant *variant)
405405
{
406406
pwm.base = base;
407407
memcpy(&pwm.variant, variant, sizeof(pwm.variant));

include/clocksource/samsung_pwm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ struct samsung_pwm_variant {
2828

2929
void samsung_pwm_clocksource_init(void __iomem *base,
3030
unsigned int *irqs,
31-
struct samsung_pwm_variant *variant);
31+
const struct samsung_pwm_variant *variant);
3232

3333
#endif /* __CLOCKSOURCE_SAMSUNG_PWM_H */

0 commit comments

Comments
 (0)