diff mbox

[25/35,linux-next] PCI: constify of_device_id array

Message ID 1426535685-25996-4-git-send-email-fabf@skynet.be (mailing list archive)
State Not Applicable
Headers show

Commit Message

Fabian Frederick March 16, 2015, 7:54 p.m. UTC
of_device_id is always used as const.
(See driver.of_match_table and open firmware functions)

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 drivers/gpio/gpio-mpc8xxx.c      | 2 +-
 drivers/gpio/gpio-octeon.c       | 2 +-
 drivers/gpio/gpio-tz1090-pdc.c   | 2 +-
 drivers/gpio/gpio-tz1090.c       | 2 +-
 drivers/gpio/gpio-zynq.c         | 2 +-
 drivers/pci/host/pci-rcar-gen2.c | 2 +-
 drivers/pci/host/pcie-xilinx.c   | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

Comments

Sergei Shtylyov March 16, 2015, 8:23 p.m. UTC | #1
Hello.

On 03/16/2015 10:54 PM, Fabian Frederick wrote:

> of_device_id is always used as const.
> (See driver.of_match_table and open firmware functions)

> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
>   drivers/gpio/gpio-mpc8xxx.c      | 2 +-
>   drivers/gpio/gpio-octeon.c       | 2 +-
>   drivers/gpio/gpio-tz1090-pdc.c   | 2 +-
>   drivers/gpio/gpio-tz1090.c       | 2 +-
>   drivers/gpio/gpio-zynq.c         | 2 +-

    What the GPIO driver changes are doing here, in the PCI patch?

>   drivers/pci/host/pci-rcar-gen2.c | 2 +-
>   drivers/pci/host/pcie-xilinx.c   | 2 +-
>   7 files changed, 7 insertions(+), 7 deletions(-)

[...]

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Fabian Frederick March 16, 2015, 8:30 p.m. UTC | #2
> On 16 March 2015 at 21:23 Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> wrote:
>
>
> Hello.
>
> On 03/16/2015 10:54 PM, Fabian Frederick wrote:
>
> > of_device_id is always used as const.
> > (See driver.of_match_table and open firmware functions)
>
> > Signed-off-by: Fabian Frederick <fabf@skynet.be>
> > ---
> >   drivers/gpio/gpio-mpc8xxx.c      | 2 +-
> >   drivers/gpio/gpio-octeon.c       | 2 +-
> >   drivers/gpio/gpio-tz1090-pdc.c   | 2 +-
> >   drivers/gpio/gpio-tz1090.c       | 2 +-
> >   drivers/gpio/gpio-zynq.c         | 2 +-
>
>     What the GPIO driver changes are doing here, in the PCI patch?
Nice catch :) I'll split that patch and only send those to avoid too much noise.

Thanks,
Fabian

>
> >   drivers/pci/host/pci-rcar-gen2.c | 2 +-
> >   drivers/pci/host/pcie-xilinx.c   | 2 +-
> >   7 files changed, 7 insertions(+), 7 deletions(-)
>
> [...]
>
> WBR, Sergei
>
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c
index a65b751..59c4c11 100644
--- a/drivers/gpio/gpio-mpc8xxx.c
+++ b/drivers/gpio/gpio-mpc8xxx.c
@@ -334,7 +334,7 @@  static struct irq_domain_ops mpc8xxx_gpio_irq_ops = {
 	.xlate	= irq_domain_xlate_twocell,
 };
 
-static struct of_device_id mpc8xxx_gpio_ids[] = {
+static const struct of_device_id mpc8xxx_gpio_ids[] = {
 	{ .compatible = "fsl,mpc8349-gpio", },
 	{ .compatible = "fsl,mpc8572-gpio", },
 	{ .compatible = "fsl,mpc8610-gpio", },
diff --git a/drivers/gpio/gpio-octeon.c b/drivers/gpio/gpio-octeon.c
index 62ae251..41b5a4f 100644
--- a/drivers/gpio/gpio-octeon.c
+++ b/drivers/gpio/gpio-octeon.c
@@ -133,7 +133,7 @@  static int octeon_gpio_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id octeon_gpio_match[] = {
+static const struct of_device_id octeon_gpio_match[] = {
 	{
 		.compatible = "cavium,octeon-3860-gpio",
 	},
diff --git a/drivers/gpio/gpio-tz1090-pdc.c b/drivers/gpio/gpio-tz1090-pdc.c
index ede7e40..d04d814 100644
--- a/drivers/gpio/gpio-tz1090-pdc.c
+++ b/drivers/gpio/gpio-tz1090-pdc.c
@@ -222,7 +222,7 @@  static int tz1090_pdc_gpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id tz1090_pdc_gpio_of_match[] = {
+static const struct of_device_id tz1090_pdc_gpio_of_match[] = {
 	{ .compatible = "img,tz1090-pdc-gpio" },
 	{ },
 };
diff --git a/drivers/gpio/gpio-tz1090.c b/drivers/gpio/gpio-tz1090.c
index 445660a..44f9dc7 100644
--- a/drivers/gpio/gpio-tz1090.c
+++ b/drivers/gpio/gpio-tz1090.c
@@ -585,7 +585,7 @@  static int tz1090_gpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id tz1090_gpio_of_match[] = {
+static const struct of_device_id tz1090_gpio_of_match[] = {
 	{ .compatible = "img,tz1090-gpio" },
 	{ },
 };
diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
index 184c4b1..8ff311a 100644
--- a/drivers/gpio/gpio-zynq.c
+++ b/drivers/gpio/gpio-zynq.c
@@ -695,7 +695,7 @@  static int zynq_gpio_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id zynq_gpio_of_match[] = {
+static const struct of_device_id zynq_gpio_of_match[] = {
 	{ .compatible = "xlnx,zynq-gpio-1.0", },
 	{ /* end of table */ }
 };
diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
index dd6b84e..db52c6a 100644
--- a/drivers/pci/host/pci-rcar-gen2.c
+++ b/drivers/pci/host/pci-rcar-gen2.c
@@ -356,7 +356,7 @@  static int rcar_pci_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id rcar_pci_of_match[] = {
+static const struct of_device_id rcar_pci_of_match[] = {
 	{ .compatible = "renesas,pci-r8a7790", },
 	{ .compatible = "renesas,pci-r8a7791", },
 	{ },
diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
index f1a06a0..caae2e4 100644
--- a/drivers/pci/host/pcie-xilinx.c
+++ b/drivers/pci/host/pcie-xilinx.c
@@ -869,7 +869,7 @@  static int xilinx_pcie_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id xilinx_pcie_of_match[] = {
+static const struct of_device_id xilinx_pcie_of_match[] = {
 	{ .compatible = "xlnx,axi-pcie-host-1.00.a", },
 	{}
 };