Skip to contentSkip to conversation

pwm: pxa: Remove PWM_ID_BASE macro

PATCH Applied Axel Lin 3 participants 3 messages Apr 1, 2013 – Apr 2, 2013 PWM

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 pwm: pxa: Remove PWM_ID_BASE macro

PWM_ID_BASE() is not used after convert to PWM framework, remove it. Also update driver_data field of struct platform_device_id accordingly.

---
This is v2 of [PATCH] pwm: pxa: Use driver_data field to store pwm_nr. I change the subject line to meet the change in v2.

 drivers/pwm/pwm-pxa.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/pwm/pwm-pxa.c +3 -4
index b789882..dee6ab55 100644
@@ -23,14 +23,13 @@
 #include <asm/div64.h>
 
 #define HAS_SECONDARY_PWM	0x10
-#define PWM_ID_BASE(d)		((d) & 0xf)
 
 static const struct platform_device_id pwm_id_table[] = {
 	/*   PWM    has_secondary_pwm? */
 	{ "pxa25x-pwm", 0 },
-	{ "pxa27x-pwm", 0 | HAS_SECONDARY_PWM },
-	{ "pxa168-pwm", 1 },
-	{ "pxa910-pwm", 1 },
+	{ "pxa27x-pwm", HAS_SECONDARY_PWM },
+	{ "pxa168-pwm", 0 },
+	{ "pxa910-pwm", 0 },
 	{ },
 };
 MODULE_DEVICE_TABLE(platform, pwm_id_table);
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 23 lines · Axel Lin

PWM_ID_BASE() is not used after convert to PWM framework, remove it. Also update driver_data field of struct platform_device_id accordingly.

---
This is v2 of [PATCH] pwm: pxa: Use driver_data field to store pwm_nr. I change the subject line to meet the change in v2.

 drivers/pwm/pwm-pxa.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/pwm/pwm-pxa.c +0 -1
index b789882..dee6ab55 100644
@@ -23,14 +23,13 @@
 #include <asm/div64.h>
 
 #define HAS_SECONDARY_PWM      0x10
-#define PWM_ID_BASE(d)         ((d) & 0xf)
 
 static const struct platform_device_id pwm_id_table[] = {
        /*   PWM    has_secondary_pwm? */

drivers/pwm/pwm-pxa.c line 35

Quoted 10 lines
drivers/pwm/pwm-pxa.c +3 -3
        { "pxa25x-pwm", 0 },
-       { "pxa27x-pwm", 0 | HAS_SECONDARY_PWM },
-       { "pxa168-pwm", 1 },
-       { "pxa910-pwm", 1 },
+       { "pxa27x-pwm", HAS_SECONDARY_PWM },
+       { "pxa168-pwm", 0 },
+       { "pxa910-pwm", 0 },
        { },
 };
 MODULE_DEVICE_TABLE(platform, pwm_id_table);

Looks good to me, Acked-by: Eric Miao <[email protected]>

#2 lore raw
In reply to Axel Lin
Quoted 7 lines · Axel Lin

PWM_ID_BASE() is not used after convert to PWM framework, remove it. Also update driver_data field of struct platform_device_id accordingly.

---
This is v2 of [PATCH] pwm: pxa: Use driver_data field to store pwm_nr. I change the subject line to meet the change in v2.

Applied, thanks.

Thierry