linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: Remove OF dependency in drv260x driver
@ 2017-03-09  0:54 Jingkui Wang
  2017-03-09  1:08 ` Dmitry Torokhov
  0 siblings, 1 reply; 5+ messages in thread
From: Jingkui Wang @ 2017-03-09  0:54 UTC (permalink / raw)
  To: linux-input; +Cc: Dmitry Torokhov, Dan Murphy, linux-kernel

As the driver is using generic device properties, it should work
properly when CONFIG_OF is turned off. This patch removes the
ifdef CONFIGOF and make sure the driver always have of_match_table.

Signed-off-by: Jingkui Wang <jkwang@google.com>
---
 drivers/input/misc/drv260x.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
index fb089d3..17eb84a 100644
--- a/drivers/input/misc/drv260x.c
+++ b/drivers/input/misc/drv260x.c
@@ -652,7 +652,6 @@ static const struct i2c_device_id drv260x_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, drv260x_id);

-#ifdef CONFIG_OF
 static const struct of_device_id drv260x_of_match[] = {
  { .compatible = "ti,drv2604", },
  { .compatible = "ti,drv2604l", },
@@ -661,13 +660,12 @@ static const struct of_device_id drv260x_of_match[] = {
  { }
 };
 MODULE_DEVICE_TABLE(of, drv260x_of_match);
-#endif

 static struct i2c_driver drv260x_driver = {
  .probe = drv260x_probe,
  .driver = {
  .name = "drv260x-haptics",
- .of_match_table = of_match_ptr(drv260x_of_match),
+ .of_match_table = drv260x_of_match,
  .pm = &drv260x_pm_ops,
  },
  .id_table = drv260x_id,
-- 
2.6.6

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drivers: Remove OF dependency in drv260x driver
  2017-03-09  0:54 [PATCH] drivers: Remove OF dependency in drv260x driver Jingkui Wang
@ 2017-03-09  1:08 ` Dmitry Torokhov
  2017-03-09  1:15   ` Jingkui Wang
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2017-03-09  1:08 UTC (permalink / raw)
  To: Jingkui Wang; +Cc: linux-input, Dan Murphy, linux-kernel

On Wed, Mar 08, 2017 at 04:54:02PM -0800, Jingkui Wang wrote:
> As the driver is using generic device properties, it should work
> properly when CONFIG_OF is turned off. This patch removes the
> ifdef CONFIGOF and make sure the driver always have of_match_table.
> 
> Signed-off-by: Jingkui Wang <jkwang@google.com>
> ---
>  drivers/input/misc/drv260x.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
> index fb089d3..17eb84a 100644
> --- a/drivers/input/misc/drv260x.c
> +++ b/drivers/input/misc/drv260x.c
> @@ -652,7 +652,6 @@ static const struct i2c_device_id drv260x_id[] = {
>  };
>  MODULE_DEVICE_TABLE(i2c, drv260x_id);
> 
> -#ifdef CONFIG_OF
>  static const struct of_device_id drv260x_of_match[] = {
>   { .compatible = "ti,drv2604", },
>   { .compatible = "ti,drv2604l", },
> @@ -661,13 +660,12 @@ static const struct of_device_id drv260x_of_match[] = {
>   { }
>  };
>  MODULE_DEVICE_TABLE(of, drv260x_of_match);
> -#endif
> 
>  static struct i2c_driver drv260x_driver = {
>   .probe = drv260x_probe,
>   .driver = {
>   .name = "drv260x-haptics",
> - .of_match_table = of_match_ptr(drv260x_of_match),
> + .of_match_table = drv260x_of_match,
>   .pm = &drv260x_pm_ops,
>   },
>   .id_table = drv260x_id,

Hmm, what did you use to mail it? Your mailer ate all tabs.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drivers: Remove OF dependency in drv260x driver
  2017-03-09  1:08 ` Dmitry Torokhov
@ 2017-03-09  1:15   ` Jingkui Wang
  0 siblings, 0 replies; 5+ messages in thread
From: Jingkui Wang @ 2017-03-09  1:15 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, Dan Murphy, linux-kernel

Sorry.. my text editor was misconfigured. Will fix and send again.

On Wed, Mar 8, 2017 at 5:08 PM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> On Wed, Mar 08, 2017 at 04:54:02PM -0800, Jingkui Wang wrote:
>> As the driver is using generic device properties, it should work
>> properly when CONFIG_OF is turned off. This patch removes the
>> ifdef CONFIGOF and make sure the driver always have of_match_table.
>>
>> Signed-off-by: Jingkui Wang <jkwang@google.com>
>> ---
>>  drivers/input/misc/drv260x.c | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
>> index fb089d3..17eb84a 100644
>> --- a/drivers/input/misc/drv260x.c
>> +++ b/drivers/input/misc/drv260x.c
>> @@ -652,7 +652,6 @@ static const struct i2c_device_id drv260x_id[] = {
>>  };
>>  MODULE_DEVICE_TABLE(i2c, drv260x_id);
>>
>> -#ifdef CONFIG_OF
>>  static const struct of_device_id drv260x_of_match[] = {
>>   { .compatible = "ti,drv2604", },
>>   { .compatible = "ti,drv2604l", },
>> @@ -661,13 +660,12 @@ static const struct of_device_id drv260x_of_match[] = {
>>   { }
>>  };
>>  MODULE_DEVICE_TABLE(of, drv260x_of_match);
>> -#endif
>>
>>  static struct i2c_driver drv260x_driver = {
>>   .probe = drv260x_probe,
>>   .driver = {
>>   .name = "drv260x-haptics",
>> - .of_match_table = of_match_ptr(drv260x_of_match),
>> + .of_match_table = drv260x_of_match,
>>   .pm = &drv260x_pm_ops,
>>   },
>>   .id_table = drv260x_id,
>
> Hmm, what did you use to mail it? Your mailer ate all tabs.
>
> Thanks.
>
> --
> Dmitry

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] drivers: Remove OF dependency in drv260x driver
@ 2017-03-09  1:24 Jingkui Wang
  2017-03-09 17:46 ` Dmitry Torokhov
  0 siblings, 1 reply; 5+ messages in thread
From: Jingkui Wang @ 2017-03-09  1:24 UTC (permalink / raw)
  To: linux-input; +Cc: Jingkui Wang, dmitry.torokhov

As the driver is using generic device properties, it should work
properly when CONFIG_OF is turned off. This patch removes the
ifdef CONFIGOF and make sure the driver always have of_match_table.

Signed-off-by: Jingkui Wang <jkwang@google.com>
---
 drivers/input/misc/drv260x.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
index fb089d3..17eb84a 100644
--- a/drivers/input/misc/drv260x.c
+++ b/drivers/input/misc/drv260x.c
@@ -652,7 +652,6 @@ static const struct i2c_device_id drv260x_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, drv260x_id);
 
-#ifdef CONFIG_OF
 static const struct of_device_id drv260x_of_match[] = {
 	{ .compatible = "ti,drv2604", },
 	{ .compatible = "ti,drv2604l", },
@@ -661,13 +660,12 @@ static const struct of_device_id drv260x_of_match[] = {
 	{ }
 };
 MODULE_DEVICE_TABLE(of, drv260x_of_match);
-#endif
 
 static struct i2c_driver drv260x_driver = {
 	.probe		= drv260x_probe,
 	.driver		= {
 		.name	= "drv260x-haptics",
-		.of_match_table = of_match_ptr(drv260x_of_match),
+		.of_match_table = drv260x_of_match,
 		.pm	= &drv260x_pm_ops,
 	},
 	.id_table = drv260x_id,
-- 
2.6.6


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drivers: Remove OF dependency in drv260x driver
  2017-03-09  1:24 Jingkui Wang
@ 2017-03-09 17:46 ` Dmitry Torokhov
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2017-03-09 17:46 UTC (permalink / raw)
  To: Jingkui Wang; +Cc: linux-input

On Wed, Mar 08, 2017 at 05:24:36PM -0800, Jingkui Wang wrote:
> As the driver is using generic device properties, it should work
> properly when CONFIG_OF is turned off. This patch removes the
> ifdef CONFIGOF and make sure the driver always have of_match_table.
> 
> Signed-off-by: Jingkui Wang <jkwang@google.com>

Applied, thank you.

> ---
>  drivers/input/misc/drv260x.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
> index fb089d3..17eb84a 100644
> --- a/drivers/input/misc/drv260x.c
> +++ b/drivers/input/misc/drv260x.c
> @@ -652,7 +652,6 @@ static const struct i2c_device_id drv260x_id[] = {
>  };
>  MODULE_DEVICE_TABLE(i2c, drv260x_id);
>  
> -#ifdef CONFIG_OF
>  static const struct of_device_id drv260x_of_match[] = {
>  	{ .compatible = "ti,drv2604", },
>  	{ .compatible = "ti,drv2604l", },
> @@ -661,13 +660,12 @@ static const struct of_device_id drv260x_of_match[] = {
>  	{ }
>  };
>  MODULE_DEVICE_TABLE(of, drv260x_of_match);
> -#endif
>  
>  static struct i2c_driver drv260x_driver = {
>  	.probe		= drv260x_probe,
>  	.driver		= {
>  		.name	= "drv260x-haptics",
> -		.of_match_table = of_match_ptr(drv260x_of_match),
> +		.of_match_table = drv260x_of_match,
>  		.pm	= &drv260x_pm_ops,
>  	},
>  	.id_table = drv260x_id,
> -- 
> 2.6.6
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-09 18:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-09  0:54 [PATCH] drivers: Remove OF dependency in drv260x driver Jingkui Wang
2017-03-09  1:08 ` Dmitry Torokhov
2017-03-09  1:15   ` Jingkui Wang
  -- strict thread matches above, loose matches on Subject: below --
2017-03-09  1:24 Jingkui Wang
2017-03-09 17:46 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).