]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/arm/mach-at91/at91sam9rl_devices.c
Merge remote-tracking branches 'regulator/topic/rk808', 'regulator/topic/rn5t618...
[karo-tx-linux.git] / arch / arm / mach-at91 / at91sam9rl_devices.c
index 0b1d71a7d9bf5b0650de1fdd6c74f394f87cfdd3..37d1c9ed4562550a1ad2f4c0994f83458b4913b1 100644 (file)
@@ -799,9 +799,7 @@ static void __init at91_add_device_watchdog(void) {}
  *  PWM
  * --------------------------------------------------------------------*/
 
-#if defined(CONFIG_ATMEL_PWM)
-static u32 pwm_mask;
-
+#if IS_ENABLED(CONFIG_PWM_ATMEL)
 static struct resource pwm_resources[] = {
        [0] = {
                .start  = AT91SAM9RL_BASE_PWMC,
@@ -816,11 +814,8 @@ static struct resource pwm_resources[] = {
 };
 
 static struct platform_device at91sam9rl_pwm0_device = {
-       .name   = "atmel_pwm",
+       .name   = "at91sam9rl-pwm",
        .id     = -1,
-       .dev    = {
-               .platform_data          = &pwm_mask,
-       },
        .resource       = pwm_resources,
        .num_resources  = ARRAY_SIZE(pwm_resources),
 };
@@ -839,8 +834,6 @@ void __init at91_add_device_pwm(u32 mask)
        if (mask & (1 << AT91_PWM3))
                at91_set_B_periph(AT91_PIN_PD8, 1);     /* enable PWM3 */
 
-       pwm_mask = mask;
-
        platform_device_register(&at91sam9rl_pwm0_device);
 }
 #else