linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] extcon: palmas: Make of_device_id array const
@ 2014-06-18  5:27 Jingoo Han
  2014-06-20  1:08 ` Chanwoo Choi
  0 siblings, 1 reply; 4+ messages in thread
From: Jingoo Han @ 2014-06-18  5:27 UTC (permalink / raw)
  To: 'Chanwoo Choi'
  Cc: 'MyungJoo Ham', linux-kernel, 'Jingoo Han',
	'Graeme Gregory', 'Kishon Vijay Abraham I'

Make of_device_id array const, because all OF functions handle
it as const.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/extcon/extcon-palmas.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index 7417ce8..5efa96c 100644
--- a/drivers/extcon/extcon-palmas.c
+++ b/drivers/extcon/extcon-palmas.c
@@ -278,7 +278,7 @@ static int palmas_usb_resume(struct device *dev)
 
 static SIMPLE_DEV_PM_OPS(palmas_pm_ops, palmas_usb_suspend, palmas_usb_resume);
 
-static struct of_device_id of_palmas_match_tbl[] = {
+static const struct of_device_id of_palmas_match_tbl[] = {
 	{ .compatible = "ti,palmas-usb", },
 	{ .compatible = "ti,palmas-usb-vid", },
 	{ .compatible = "ti,twl6035-usb", },
-- 
1.7.10.4



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

* Re: [PATCH] extcon: palmas: Make of_device_id array const
  2014-06-18  5:27 [PATCH] extcon: palmas: Make of_device_id array const Jingoo Han
@ 2014-06-20  1:08 ` Chanwoo Choi
  0 siblings, 0 replies; 4+ messages in thread
From: Chanwoo Choi @ 2014-06-20  1:08 UTC (permalink / raw)
  To: Jingoo Han
  Cc: 'MyungJoo Ham', linux-kernel, 'Graeme Gregory',
	'Kishon Vijay Abraham I'

Hi Jingoo,

On 06/18/2014 02:27 PM, Jingoo Han wrote:
> Make of_device_id array const, because all OF functions handle
> it as const.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
>  drivers/extcon/extcon-palmas.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
> index 7417ce8..5efa96c 100644
> --- a/drivers/extcon/extcon-palmas.c
> +++ b/drivers/extcon/extcon-palmas.c
> @@ -278,7 +278,7 @@ static int palmas_usb_resume(struct device *dev)
>  
>  static SIMPLE_DEV_PM_OPS(palmas_pm_ops, palmas_usb_suspend, palmas_usb_resume);
>  
> -static struct of_device_id of_palmas_match_tbl[] = {
> +static const struct of_device_id of_palmas_match_tbl[] = {
>  	{ .compatible = "ti,palmas-usb", },
>  	{ .compatible = "ti,palmas-usb-vid", },
>  	{ .compatible = "ti,twl6035-usb", },
> 

The same patch was applied by Krzysztof Kozlowski on extcon-next branch. 

Thanks,
Chanwoo Choi

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

* Re: [PATCH] extcon: palmas: Make of_device_id array const
  2014-05-23  9:03 Krzysztof Kozlowski
@ 2014-05-28  4:43 ` Chanwoo Choi
  0 siblings, 0 replies; 4+ messages in thread
From: Chanwoo Choi @ 2014-05-28  4:43 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: MyungJoo Ham, linux-kernel, Graeme Gregory

On 05/23/2014 06:03 PM, Krzysztof Kozlowski wrote:
> Array of struct of_device_id may be be const as expected by
> of_match_table field.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: Graeme Gregory <gg@slimlogic.co.uk>
> ---
>  drivers/extcon/extcon-palmas.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
> index ddff2b72f0a8..eb59fe564fd1 100644
> --- a/drivers/extcon/extcon-palmas.c
> +++ b/drivers/extcon/extcon-palmas.c
> @@ -273,7 +273,7 @@ static int palmas_usb_resume(struct device *dev)
>  
>  static SIMPLE_DEV_PM_OPS(palmas_pm_ops, palmas_usb_suspend, palmas_usb_resume);
>  
> -static struct of_device_id of_palmas_match_tbl[] = {
> +static const struct of_device_id of_palmas_match_tbl[] = {
>  	{ .compatible = "ti,palmas-usb", },
>  	{ .compatible = "ti,palmas-usb-vid", },
>  	{ .compatible = "ti,twl6035-usb", },
> 

Applied.

Thanks,
Chanwoo Choi

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

* [PATCH] extcon: palmas: Make of_device_id array const
@ 2014-05-23  9:03 Krzysztof Kozlowski
  2014-05-28  4:43 ` Chanwoo Choi
  0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2014-05-23  9:03 UTC (permalink / raw)
  To: MyungJoo Ham, Chanwoo Choi, linux-kernel
  Cc: Krzysztof Kozlowski, Graeme Gregory

Array of struct of_device_id may be be const as expected by
of_match_table field.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Graeme Gregory <gg@slimlogic.co.uk>
---
 drivers/extcon/extcon-palmas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index ddff2b72f0a8..eb59fe564fd1 100644
--- a/drivers/extcon/extcon-palmas.c
+++ b/drivers/extcon/extcon-palmas.c
@@ -273,7 +273,7 @@ static int palmas_usb_resume(struct device *dev)
 
 static SIMPLE_DEV_PM_OPS(palmas_pm_ops, palmas_usb_suspend, palmas_usb_resume);
 
-static struct of_device_id of_palmas_match_tbl[] = {
+static const struct of_device_id of_palmas_match_tbl[] = {
 	{ .compatible = "ti,palmas-usb", },
 	{ .compatible = "ti,palmas-usb-vid", },
 	{ .compatible = "ti,twl6035-usb", },
-- 
1.9.1


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

end of thread, other threads:[~2014-06-20  1:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-18  5:27 [PATCH] extcon: palmas: Make of_device_id array const Jingoo Han
2014-06-20  1:08 ` Chanwoo Choi
  -- strict thread matches above, loose matches on Subject: below --
2014-05-23  9:03 Krzysztof Kozlowski
2014-05-28  4:43 ` Chanwoo Choi

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).