aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-pxa/pwm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/pwm.c b/arch/arm/mach-pxa/pwm.c
index dec6f2c8dbf9..5513c51ff984 100644
--- a/arch/arm/mach-pxa/pwm.c
+++ b/arch/arm/mach-pxa/pwm.c
@@ -22,11 +22,12 @@
22#include <asm/div64.h> 22#include <asm/div64.h>
23 23
24#define HAS_SECONDARY_PWM 0x10 24#define HAS_SECONDARY_PWM 0x10
25#define PWM_ID_BASE(d) ((d) & 0xf)
25 26
26static const struct platform_device_id pwm_id_table[] = { 27static const struct platform_device_id pwm_id_table[] = {
27 /* PWM has_secondary_pwm? */ 28 /* PWM has_secondary_pwm? */
28 { "pxa25x-pwm", 0 }, 29 { "pxa25x-pwm", 0 },
29 { "pxa27x-pwm", HAS_SECONDARY_PWM }, 30 { "pxa27x-pwm", 0 | HAS_SECONDARY_PWM },
30 { }, 31 { },
31}; 32};
32MODULE_DEVICE_TABLE(platform, pwm_id_table); 33MODULE_DEVICE_TABLE(platform, pwm_id_table);
@@ -191,7 +192,7 @@ static int __devinit pwm_probe(struct platform_device *pdev)
191 pwm->clk_enabled = 0; 192 pwm->clk_enabled = 0;
192 193
193 pwm->use_count = 0; 194 pwm->use_count = 0;
194 pwm->pwm_id = pdev->id; 195 pwm->pwm_id = PWM_ID_BASE(id->driver_data) + pdev->id;
195 pwm->pdev = pdev; 196 pwm->pdev = pdev;
196 197
197 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); 198 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);