diff options
Diffstat (limited to 'arch/arm/mach-at91/at91sam9263_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9263_devices.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index 309390d8e2f8..cef0e2f57068 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -1131,9 +1131,7 @@ static void __init at91_add_device_watchdog(void) {} | |||
1131 | * PWM | 1131 | * PWM |
1132 | * --------------------------------------------------------------------*/ | 1132 | * --------------------------------------------------------------------*/ |
1133 | 1133 | ||
1134 | #if defined(CONFIG_ATMEL_PWM) | 1134 | #if IS_ENABLED(CONFIG_PWM_ATMEL) |
1135 | static u32 pwm_mask; | ||
1136 | |||
1137 | static struct resource pwm_resources[] = { | 1135 | static struct resource pwm_resources[] = { |
1138 | [0] = { | 1136 | [0] = { |
1139 | .start = AT91SAM9263_BASE_PWMC, | 1137 | .start = AT91SAM9263_BASE_PWMC, |
@@ -1148,11 +1146,8 @@ static struct resource pwm_resources[] = { | |||
1148 | }; | 1146 | }; |
1149 | 1147 | ||
1150 | static struct platform_device at91sam9263_pwm0_device = { | 1148 | static struct platform_device at91sam9263_pwm0_device = { |
1151 | .name = "atmel_pwm", | 1149 | .name = "at91sam9rl-pwm", |
1152 | .id = -1, | 1150 | .id = -1, |
1153 | .dev = { | ||
1154 | .platform_data = &pwm_mask, | ||
1155 | }, | ||
1156 | .resource = pwm_resources, | 1151 | .resource = pwm_resources, |
1157 | .num_resources = ARRAY_SIZE(pwm_resources), | 1152 | .num_resources = ARRAY_SIZE(pwm_resources), |
1158 | }; | 1153 | }; |
@@ -1171,8 +1166,6 @@ void __init at91_add_device_pwm(u32 mask) | |||
1171 | if (mask & (1 << AT91_PWM3)) | 1166 | if (mask & (1 << AT91_PWM3)) |
1172 | at91_set_B_periph(AT91_PIN_PB29, 1); /* enable PWM3 */ | 1167 | at91_set_B_periph(AT91_PIN_PB29, 1); /* enable PWM3 */ |
1173 | 1168 | ||
1174 | pwm_mask = mask; | ||
1175 | |||
1176 | platform_device_register(&at91sam9263_pwm0_device); | 1169 | platform_device_register(&at91sam9263_pwm0_device); |
1177 | } | 1170 | } |
1178 | #else | 1171 | #else |