diff mbox

[Resend,1/2] pwm: atmel: Remove redundant of_match_ptr helper

Message ID 1390474715-6587-1-git-send-email-sachin.kamat@linaro.org
State Changes Requested
Headers show

Commit Message

Sachin Kamat Jan. 23, 2014, 10:58 a.m. UTC
'atmel_pwm_dt_ids' is always compiled in. Hence the
helper macro is not needed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/pwm/pwm-atmel.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thierry Reding Jan. 23, 2014, 12:44 p.m. UTC | #1
On Thu, Jan 23, 2014 at 04:28:34PM +0530, Sachin Kamat wrote:
> 'atmel_pwm_dt_ids' is always compiled in. Hence the
> helper macro is not needed.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  drivers/pwm/pwm-atmel.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Hi Sachin,

Sorry for taking so long to look at this, things have been pretty
busy...

> diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c
> index bf4144a14661..45f0fb793528 100644
> --- a/drivers/pwm/pwm-atmel.c
> +++ b/drivers/pwm/pwm-atmel.c
> @@ -381,7 +381,7 @@ static int atmel_pwm_remove(struct platform_device *pdev)
>  static struct platform_driver atmel_pwm_driver = {
>  	.driver = {
>  		.name = "atmel-pwm",
> -		.of_match_table = of_match_ptr(atmel_pwm_dt_ids),
> +		.of_match_table = atmel_pwm_dt_ids,
>  	},
>  	.id_table = atmel_pwm_devtypes,
>  	.probe = atmel_pwm_probe,

Given that the driver doesn't depend on OF, I think the right thing to
do here would be to #ifdef the atmel_pwm_dt_ids so it doesn't waste
needless memory.

See also my comment to patch 2/2 that I'm about to send out.

Thierry
Sachin Kamat Jan. 24, 2014, 9:04 a.m. UTC | #2
Hi Thierry,

On 23 January 2014 18:14, Thierry Reding <thierry.reding@gmail.com> wrote:
> On Thu, Jan 23, 2014 at 04:28:34PM +0530, Sachin Kamat wrote:
>> 'atmel_pwm_dt_ids' is always compiled in. Hence the
>> helper macro is not needed.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> ---
>>  drivers/pwm/pwm-atmel.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Hi Sachin,
>
> Sorry for taking so long to look at this, things have been pretty
> busy...

No problem. Sorry to bother you though.

>
>> diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c
>> index bf4144a14661..45f0fb793528 100644
>> --- a/drivers/pwm/pwm-atmel.c
>> +++ b/drivers/pwm/pwm-atmel.c
>> @@ -381,7 +381,7 @@ static int atmel_pwm_remove(struct platform_device *pdev)
>>  static struct platform_driver atmel_pwm_driver = {
>>       .driver = {
>>               .name = "atmel-pwm",
>> -             .of_match_table = of_match_ptr(atmel_pwm_dt_ids),
>> +             .of_match_table = atmel_pwm_dt_ids,
>>       },
>>       .id_table = atmel_pwm_devtypes,
>>       .probe = atmel_pwm_probe,
>
> Given that the driver doesn't depend on OF, I think the right thing to
> do here would be to #ifdef the atmel_pwm_dt_ids so it doesn't waste
> needless memory.

OK. Will update accordingly.
diff mbox

Patch

diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c
index bf4144a14661..45f0fb793528 100644
--- a/drivers/pwm/pwm-atmel.c
+++ b/drivers/pwm/pwm-atmel.c
@@ -381,7 +381,7 @@  static int atmel_pwm_remove(struct platform_device *pdev)
 static struct platform_driver atmel_pwm_driver = {
 	.driver = {
 		.name = "atmel-pwm",
-		.of_match_table = of_match_ptr(atmel_pwm_dt_ids),
+		.of_match_table = atmel_pwm_dt_ids,
 	},
 	.id_table = atmel_pwm_devtypes,
 	.probe = atmel_pwm_probe,