2013-04-01 07:41:30

by Axel Lin

[permalink] [raw]
Subject: [PATCH] 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.

Signed-off-by: Axel Lin <[email protected]>
---
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(-)

diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c
index b789882..dee6ab55 100644
--- a/drivers/pwm/pwm-pxa.c
+++ b/drivers/pwm/pwm-pxa.c
@@ -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);
--
1.7.10.4



2013-04-01 09:10:13

by Eric Miao

[permalink] [raw]
Subject: Re: [PATCH] pwm: pxa: Remove PWM_ID_BASE macro

On Mon, Apr 1, 2013 at 3:41 PM, Axel Lin <[email protected]> wrote:
> PWM_ID_BASE() is not used after convert to PWM framework, remove it.
> Also update driver_data field of struct platform_device_id accordingly.
>
> Signed-off-by: Axel Lin <[email protected]>
> ---
> 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(-)
>
> diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c
> index b789882..dee6ab55 100644
> --- a/drivers/pwm/pwm-pxa.c
> +++ b/drivers/pwm/pwm-pxa.c
> @@ -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);

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

2013-04-02 09:38:50

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH] pwm: pxa: Remove PWM_ID_BASE macro

On Mon, Apr 01, 2013 at 03:41:22PM +0800, Axel Lin wrote:
> PWM_ID_BASE() is not used after convert to PWM framework, remove it.
> Also update driver_data field of struct platform_device_id accordingly.
>
> Signed-off-by: Axel Lin <[email protected]>
> ---
> 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


Attachments:
(No filename) (414.00 B)
(No filename) (836.00 B)
Download all attachments