linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/35 linux-next] constify of_device_id array
@ 2015-03-16 19:17 Fabian Frederick
  2015-03-16 19:17 ` [PATCH 05/35 linux-next] tty: " Fabian Frederick
       [not found] ` <1426535685-25996-1-git-send-email-fabf@skynet.be>
  0 siblings, 2 replies; 7+ messages in thread
From: Fabian Frederick @ 2015-03-16 19:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fbdev, kernel, linux-sh, linux-iio, linux-pci, dri-devel,
	virtualization, linux-ide, linux-mtd, Peter Meerwald,
	openipmi-developer, devel, Lars-Peter Clausen, lm-sensors,
	Sören Brinkmann, linux-serial, linux-input, linux-media,
	linux-pwm, linux-pm, Fabian Frederick, linux-gpio,
	linux-samsung-soc, linux-mediatek, linux-rpi-kernel, linux-tegra,
	Dan Williams

This small patchset adds const to of_device_id arrays in
drivers branch.

Fabian Frederick (35):
  ata: constify of_device_id array
  regulator: constify of_device_id array
  thermal: constify of_device_id array
  tty/hvc_opal: constify of_device_id array
  tty: constify of_device_id array
  power: constify of_device_id array
  char: constify of_device_id array
  dma: constify of_device_id array
  iio: constify of_device_id array
  misc: constify of_device_id array
  usb: gadget: constify of_device_id array
  mtd: constify of_device_id array
  w1: constify of_device_id array
  ide: pmac: constify of_device_id array
  spi: constify of_device_id array
  video: constify of_device_id array
  coresight-replicator: constify of_device_id array
  macintosh: constify of_device_id array
  virtio_mmio: constify of_device_id array
  swim3: constify of_device_id array
  mfd: constify of_device_id array
  soc: ti: constify of_device_id array
  [media]: constify of_device_id array
  Input: constify of_device_id array
  PCI: constify of_device_id array
  hwmon: constify of_device_id array
  reset: sti: constify of_device_id array
  uio: constify of_device_id array
  gpu: constify of_device_id array
  devfreq: constify of_device_id array
  EDAC: constify of_device_id array
  clk: constify of_device_id array
  mmc: constify of_device_id array
  Staging: octeon: constify of_device_id array
  pinctrl: constify of_device_id array

 drivers/ata/pata_macio.c                     | 2 +-
 drivers/ata/pata_mpc52xx.c                   | 2 +-
 drivers/ata/pata_octeon_cf.c                 | 2 +-
 drivers/ata/pata_of_platform.c               | 2 +-
 drivers/ata/sata_fsl.c                       | 2 +-
 drivers/ata/sata_mv.c                        | 2 +-
 drivers/ata/sata_rcar.c                      | 2 +-
 drivers/block/swim3.c                        | 2 +-
 drivers/char/hw_random/pasemi-rng.c          | 2 +-
 drivers/char/hw_random/powernv-rng.c         | 2 +-
 drivers/char/hw_random/ppc4xx-rng.c          | 2 +-
 drivers/char/ipmi/ipmi_si_intf.c             | 4 ++--
 drivers/char/xillybus/xillybus_of.c          | 2 +-
 drivers/clk/clk-palmas.c                     | 2 +-
 drivers/clk/st/clkgen-fsyn.c                 | 2 +-
 drivers/clk/st/clkgen-mux.c                  | 8 ++++----
 drivers/clk/st/clkgen-pll.c                  | 4 ++--
 drivers/clk/ti/clk-dra7-atl.c                | 2 +-
 drivers/clk/ti/clockdomain.c                 | 2 +-
 drivers/clk/versatile/clk-vexpress-osc.c     | 2 +-
 drivers/coresight/coresight-replicator.c     | 2 +-
 drivers/devfreq/event/exynos-ppmu.c          | 2 +-
 drivers/devfreq/tegra-devfreq.c              | 2 +-
 drivers/dma/bestcomm/bestcomm.c              | 4 ++--
 drivers/dma/k3dma.c                          | 2 +-
 drivers/dma/mmp_pdma.c                       | 2 +-
 drivers/dma/mmp_tdma.c                       | 2 +-
 drivers/dma/mpc512x_dma.c                    | 2 +-
 drivers/dma/mv_xor.c                         | 2 +-
 drivers/dma/sirf-dma.c                       | 2 +-
 drivers/dma/sun6i-dma.c                      | 2 +-
 drivers/edac/highbank_mc_edac.c              | 2 +-
 drivers/edac/mpc85xx_edac.c                  | 4 ++--
 drivers/edac/ppc4xx_edac.c                   | 2 +-
 drivers/edac/synopsys_edac.c                 | 2 +-
 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/gpu/drm/armada/armada_crtc.c         | 2 +-
 drivers/gpu/drm/exynos/exynos_drm_dsi.c      | 2 +-
 drivers/gpu/drm/exynos/exynos_hdmi.c         | 2 +-
 drivers/gpu/drm/exynos/exynos_mixer.c        | 2 +-
 drivers/gpu/drm/panel/panel-ld9040.c         | 2 +-
 drivers/gpu/drm/panel/panel-s6e8aa0.c        | 2 +-
 drivers/gpu/drm/sti/sti_dvo.c                | 2 +-
 drivers/gpu/drm/sti/sti_hqvdp.c              | 2 +-
 drivers/gpu/drm/tilcdc/tilcdc_drv.c          | 4 ++--
 drivers/gpu/drm/tilcdc/tilcdc_panel.c        | 2 +-
 drivers/gpu/drm/tilcdc/tilcdc_slave.c        | 4 ++--
 drivers/gpu/drm/tilcdc/tilcdc_tfp410.c       | 4 ++--
 drivers/gpu/host1x/dev.c                     | 2 +-
 drivers/gpu/host1x/mipi.c                    | 2 +-
 drivers/hwmon/pwm-fan.c                      | 2 +-
 drivers/hwmon/vexpress.c                     | 2 +-
 drivers/ide/pmac.c                           | 2 +-
 drivers/iio/common/ssp_sensors/ssp_dev.c     | 2 +-
 drivers/input/misc/palmas-pwrbutton.c        | 2 +-
 drivers/input/misc/regulator-haptic.c        | 2 +-
 drivers/input/misc/tps65218-pwrbutton.c      | 2 +-
 drivers/input/touchscreen/ar1021_i2c.c       | 2 +-
 drivers/macintosh/mediabay.c                 | 2 +-
 drivers/macintosh/rack-meter.c               | 2 +-
 drivers/media/i2c/adv7604.c                  | 2 +-
 drivers/media/platform/fsl-viu.c             | 2 +-
 drivers/media/platform/soc_camera/rcar_vin.c | 2 +-
 drivers/media/rc/gpio-ir-recv.c              | 2 +-
 drivers/media/rc/ir-hix5hd2.c                | 2 +-
 drivers/media/rc/st_rc.c                     | 2 +-
 drivers/mfd/hi6421-pmic-core.c               | 2 +-
 drivers/mfd/rk808.c                          | 2 +-
 drivers/mfd/twl4030-power.c                  | 2 +-
 drivers/misc/carma/carma-fpga-program.c      | 2 +-
 drivers/misc/carma/carma-fpga.c              | 2 +-
 drivers/misc/lis3lv02d/lis3lv02d_i2c.c       | 2 +-
 drivers/misc/lis3lv02d/lis3lv02d_spi.c       | 2 +-
 drivers/misc/sram.c                          | 2 +-
 drivers/mmc/host/mmc_spi.c                   | 2 +-
 drivers/mmc/host/wmt-sdmmc.c                 | 2 +-
 drivers/mtd/devices/docg3.c                  | 2 +-
 drivers/mtd/maps/physmap_of.c                | 4 ++--
 drivers/mtd/nand/mpc5121_nfc.c               | 2 +-
 drivers/mtd/spi-nor/fsl-quadspi.c            | 2 +-
 drivers/pci/host/pci-rcar-gen2.c             | 2 +-
 drivers/pci/host/pcie-xilinx.c               | 2 +-
 drivers/pinctrl/bcm/pinctrl-bcm2835.c        | 2 +-
 drivers/pinctrl/mediatek/pinctrl-mt8135.c    | 2 +-
 drivers/pinctrl/mediatek/pinctrl-mt8173.c    | 2 +-
 drivers/pinctrl/mvebu/pinctrl-armada-370.c   | 2 +-
 drivers/pinctrl/mvebu/pinctrl-armada-375.c   | 2 +-
 drivers/pinctrl/mvebu/pinctrl-armada-38x.c   | 2 +-
 drivers/pinctrl/mvebu/pinctrl-armada-39x.c   | 2 +-
 drivers/pinctrl/mvebu/pinctrl-armada-xp.c    | 2 +-
 drivers/pinctrl/mvebu/pinctrl-kirkwood.c     | 2 +-
 drivers/pinctrl/mvebu/pinctrl-orion.c        | 2 +-
 drivers/pinctrl/pinctrl-as3722.c             | 2 +-
 drivers/pinctrl/pinctrl-at91.c               | 4 ++--
 drivers/pinctrl/pinctrl-palmas.c             | 2 +-
 drivers/pinctrl/pinctrl-single.c             | 4 ++--
 drivers/pinctrl/pinctrl-st.c                 | 2 +-
 drivers/pinctrl/pinctrl-tz1090-pdc.c         | 2 +-
 drivers/pinctrl/pinctrl-tz1090.c             | 2 +-
 drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c    | 2 +-
 drivers/pinctrl/sunxi/pinctrl-sun5i-a10s.c   | 2 +-
 drivers/pinctrl/sunxi/pinctrl-sun5i-a13.c    | 2 +-
 drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c  | 2 +-
 drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c    | 2 +-
 drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c   | 2 +-
 drivers/pinctrl/sunxi/pinctrl-sun7i-a20.c    | 2 +-
 drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c  | 2 +-
 drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c    | 2 +-
 drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c    | 2 +-
 drivers/pinctrl/vt8500/pinctrl-vt8500.c      | 2 +-
 drivers/pinctrl/vt8500/pinctrl-wm8505.c      | 2 +-
 drivers/pinctrl/vt8500/pinctrl-wm8650.c      | 2 +-
 drivers/pinctrl/vt8500/pinctrl-wm8750.c      | 2 +-
 drivers/pinctrl/vt8500/pinctrl-wm8850.c      | 2 +-
 drivers/power/charger-manager.c              | 2 +-
 drivers/power/reset/at91-poweroff.c          | 2 +-
 drivers/power/reset/at91-reset.c             | 4 ++--
 drivers/power/reset/hisi-reboot.c            | 2 +-
 drivers/power/reset/keystone-reset.c         | 2 +-
 drivers/power/reset/st-poweroff.c            | 2 +-
 drivers/power/reset/syscon-reboot.c          | 2 +-
 drivers/power/reset/vexpress-poweroff.c      | 2 +-
 drivers/power/reset/xgene-reboot.c           | 2 +-
 drivers/power/tps65090-charger.c             | 2 +-
 drivers/regulator/palmas-regulator.c         | 2 +-
 drivers/reset/sti/reset-stih407.c            | 2 +-
 drivers/reset/sti/reset-stih415.c            | 2 +-
 drivers/reset/sti/reset-stih416.c            | 2 +-
 drivers/soc/ti/knav_dma.c                    | 2 +-
 drivers/soc/ti/knav_qmss_queue.c             | 2 +-
 drivers/spi/spi-mpc512x-psc.c                | 2 +-
 drivers/spi/spi-octeon.c                     | 2 +-
 drivers/spi/spi-st-ssc4.c                    | 2 +-
 drivers/staging/octeon-usb/octeon-hcd.c      | 2 +-
 drivers/staging/octeon/ethernet.c            | 2 +-
 drivers/thermal/st/st_thermal_memmap.c       | 2 +-
 drivers/thermal/st/st_thermal_syscfg.c       | 2 +-
 drivers/tty/hvc/hvc_opal.c                   | 2 +-
 drivers/tty/serial/apbuart.c                 | 2 +-
 drivers/tty/serial/cpm_uart/cpm_uart_core.c  | 2 +-
 drivers/tty/serial/fsl_lpuart.c              | 2 +-
 drivers/tty/serial/mpc52xx_uart.c            | 2 +-
 drivers/tty/serial/mxs-auart.c               | 2 +-
 drivers/tty/serial/of_serial.c               | 4 ++--
 drivers/tty/serial/pmac_zilog.c              | 2 +-
 drivers/tty/serial/pxa.c                     | 2 +-
 drivers/tty/serial/serial-tegra.c            | 2 +-
 drivers/tty/serial/sirfsoc_uart.c            | 2 +-
 drivers/tty/serial/st-asc.c                  | 2 +-
 drivers/tty/serial/uartlite.c                | 2 +-
 drivers/tty/serial/ucc_uart.c                | 2 +-
 drivers/tty/serial/xilinx_uartps.c           | 2 +-
 drivers/uio/uio_pdrv_genirq.c                | 2 +-
 drivers/usb/gadget/udc/pxa27x_udc.c          | 2 +-
 drivers/video/backlight/gpio_backlight.c     | 2 +-
 drivers/video/backlight/pwm_bl.c             | 2 +-
 drivers/video/fbdev/fsl-diu-fb.c             | 2 +-
 drivers/video/fbdev/grvga.c                  | 2 +-
 drivers/video/fbdev/mb862xx/mb862xxfbdrv.c   | 2 +-
 drivers/video/fbdev/ocfb.c                   | 2 +-
 drivers/video/fbdev/platinumfb.c             | 2 +-
 drivers/video/fbdev/xilinxfb.c               | 2 +-
 drivers/virtio/virtio_mmio.c                 | 2 +-
 drivers/w1/masters/mxc_w1.c                  | 2 +-
 drivers/w1/masters/omap_hdq.c                | 2 +-
 drivers/w1/masters/w1-gpio.c                 | 2 +-
 170 files changed, 185 insertions(+), 185 deletions(-)

-- 
2.1.0

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

* [PATCH 05/35 linux-next] tty: constify of_device_id array
  2015-03-16 19:17 [PATCH 00/35 linux-next] constify of_device_id array Fabian Frederick
@ 2015-03-16 19:17 ` Fabian Frederick
  2015-03-16 19:20   ` Timur Tabi
                     ` (2 more replies)
       [not found] ` <1426535685-25996-1-git-send-email-fabf@skynet.be>
  1 sibling, 3 replies; 7+ messages in thread
From: Fabian Frederick @ 2015-03-16 19:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, Fabian Frederick, Jiri Slaby, Laxman Dewangan,
	Stephen Warren, Thierry Reding, Alexandre Courbot, Barry Song,
	Srinivas Kandagatla, Maxime Coquelin, Patrice Chotard,
	Peter Korsgaard, Timur Tabi, Michal Simek, Sören Brinkmann,
	linux-serial, linux-tegra, linux-arm-kernel, kernel, linuxppc-dev

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/tty/serial/apbuart.c                | 2 +-
 drivers/tty/serial/cpm_uart/cpm_uart_core.c | 2 +-
 drivers/tty/serial/fsl_lpuart.c             | 2 +-
 drivers/tty/serial/mpc52xx_uart.c           | 2 +-
 drivers/tty/serial/mxs-auart.c              | 2 +-
 drivers/tty/serial/of_serial.c              | 4 ++--
 drivers/tty/serial/pmac_zilog.c             | 2 +-
 drivers/tty/serial/pxa.c                    | 2 +-
 drivers/tty/serial/serial-tegra.c           | 2 +-
 drivers/tty/serial/sirfsoc_uart.c           | 2 +-
 drivers/tty/serial/st-asc.c                 | 2 +-
 drivers/tty/serial/uartlite.c               | 2 +-
 drivers/tty/serial/ucc_uart.c               | 2 +-
 drivers/tty/serial/xilinx_uartps.c          | 2 +-
 14 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/tty/serial/apbuart.c b/drivers/tty/serial/apbuart.c
index 4f0f95e..f3af317 100644
--- a/drivers/tty/serial/apbuart.c
+++ b/drivers/tty/serial/apbuart.c
@@ -572,7 +572,7 @@ static int apbuart_probe(struct platform_device *op)
 	return 0;
 }
 
-static struct of_device_id apbuart_match[] = {
+static const struct of_device_id apbuart_match[] = {
 	{
 	 .name = "GAISLER_APBUART",
 	 },
diff --git a/drivers/tty/serial/cpm_uart/cpm_uart_core.c b/drivers/tty/serial/cpm_uart/cpm_uart_core.c
index fddb1fd..08431ad 100644
--- a/drivers/tty/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/tty/serial/cpm_uart/cpm_uart_core.c
@@ -1435,7 +1435,7 @@ static int cpm_uart_remove(struct platform_device *ofdev)
 	return uart_remove_one_port(&cpm_reg, &pinfo->port);
 }
 
-static struct of_device_id cpm_uart_match[] = {
+static const struct of_device_id cpm_uart_match[] = {
 	{
 		.compatible = "fsl,cpm1-smc-uart",
 	},
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index b1893f3..946273a 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -257,7 +257,7 @@ struct lpuart_port {
 	struct timer_list	lpuart_timer;
 };
 
-static struct of_device_id lpuart_dt_ids[] = {
+static const struct of_device_id lpuart_dt_ids[] = {
 	{
 		.compatible = "fsl,vf610-lpuart",
 	},
diff --git a/drivers/tty/serial/mpc52xx_uart.c b/drivers/tty/serial/mpc52xx_uart.c
index 3308ef2..1589f17 100644
--- a/drivers/tty/serial/mpc52xx_uart.c
+++ b/drivers/tty/serial/mpc52xx_uart.c
@@ -1717,7 +1717,7 @@ static struct uart_driver mpc52xx_uart_driver = {
 /* OF Platform Driver                                                       */
 /* ======================================================================== */
 
-static struct of_device_id mpc52xx_uart_of_match[] = {
+static const struct of_device_id mpc52xx_uart_of_match[] = {
 #ifdef CONFIG_PPC_MPC52xx
 	{ .compatible = "fsl,mpc5200b-psc-uart", .data = &mpc5200b_psc_ops, },
 	{ .compatible = "fsl,mpc5200-psc-uart", .data = &mpc52xx_psc_ops, },
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index 20a863b..f7e5825 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -176,7 +176,7 @@ static struct platform_device_id mxs_auart_devtype[] = {
 };
 MODULE_DEVICE_TABLE(platform, mxs_auart_devtype);
 
-static struct of_device_id mxs_auart_dt_ids[] = {
+static const struct of_device_id mxs_auart_dt_ids[] = {
 	{
 		.compatible = "fsl,imx28-auart",
 		.data = &mxs_auart_devtype[IMX28_AUART]
diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c
index 33fb94f..d8c4eea 100644
--- a/drivers/tty/serial/of_serial.c
+++ b/drivers/tty/serial/of_serial.c
@@ -155,7 +155,7 @@ out:
 /*
  * Try to register a serial port
  */
-static struct of_device_id of_platform_serial_table[];
+static const struct of_device_id of_platform_serial_table[];
 static int of_platform_serial_probe(struct platform_device *ofdev)
 {
 	const struct of_device_id *match;
@@ -320,7 +320,7 @@ static SIMPLE_DEV_PM_OPS(of_serial_pm_ops, of_serial_suspend, of_serial_resume);
 /*
  * A few common types, add more as needed.
  */
-static struct of_device_id of_platform_serial_table[] = {
+static const struct of_device_id of_platform_serial_table[] = {
 	{ .compatible = "ns8250",   .data = (void *)PORT_8250, },
 	{ .compatible = "ns16450",  .data = (void *)PORT_16450, },
 	{ .compatible = "ns16550a", .data = (void *)PORT_16550A, },
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c
index 8f51579..e156e39 100644
--- a/drivers/tty/serial/pmac_zilog.c
+++ b/drivers/tty/serial/pmac_zilog.c
@@ -1846,7 +1846,7 @@ static int __init pmz_register(void)
 
 #ifdef CONFIG_PPC_PMAC
 
-static struct of_device_id pmz_match[] = 
+static const struct of_device_id pmz_match[] =
 {
 	{
 	.name		= "ch-a",
diff --git a/drivers/tty/serial/pxa.c b/drivers/tty/serial/pxa.c
index d5d0626..9becba6 100644
--- a/drivers/tty/serial/pxa.c
+++ b/drivers/tty/serial/pxa.c
@@ -824,7 +824,7 @@ static const struct dev_pm_ops serial_pxa_pm_ops = {
 };
 #endif
 
-static struct of_device_id serial_pxa_dt_ids[] = {
+static const struct of_device_id serial_pxa_dt_ids[] = {
 	{ .compatible = "mrvl,pxa-uart", },
 	{ .compatible = "mrvl,mmp-uart", },
 	{}
diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index 48e6e41..1d5ea39 100644
--- a/drivers/tty/serial/serial-tegra.c
+++ b/drivers/tty/serial/serial-tegra.c
@@ -1251,7 +1251,7 @@ static struct tegra_uart_chip_data tegra30_uart_chip_data = {
 	.support_clk_src_div		= true,
 };
 
-static struct of_device_id tegra_uart_of_match[] = {
+static const struct of_device_id tegra_uart_of_match[] = {
 	{
 		.compatible	= "nvidia,tegra30-hsuart",
 		.data		= &tegra30_uart_chip_data,
diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c
index 27ed0e9..9de3eab 100644
--- a/drivers/tty/serial/sirfsoc_uart.c
+++ b/drivers/tty/serial/sirfsoc_uart.c
@@ -1269,7 +1269,7 @@ static struct uart_driver sirfsoc_uart_drv = {
 #endif
 };
 
-static struct of_device_id sirfsoc_uart_ids[] = {
+static const struct of_device_id sirfsoc_uart_ids[] = {
 	{ .compatible = "sirf,prima2-uart", .data = &sirfsoc_uart,},
 	{ .compatible = "sirf,atlas7-uart", .data = &sirfsoc_uart},
 	{ .compatible = "sirf,prima2-usp-uart", .data = &sirfsoc_usp},
diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
index 712b03a..d625664 100644
--- a/drivers/tty/serial/st-asc.c
+++ b/drivers/tty/serial/st-asc.c
@@ -720,7 +720,7 @@ static struct asc_port *asc_of_get_asc_port(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_OF
-static struct of_device_id asc_match[] = {
+static const struct of_device_id asc_match[] = {
 	{ .compatible = "st,asc", },
 	{},
 };
diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c
index 189f52e..708eead 100644
--- a/drivers/tty/serial/uartlite.c
+++ b/drivers/tty/serial/uartlite.c
@@ -622,7 +622,7 @@ static int ulite_release(struct device *dev)
 
 #if defined(CONFIG_OF)
 /* Match table for of_platform binding */
-static struct of_device_id ulite_of_match[] = {
+static const struct of_device_id ulite_of_match[] = {
 	{ .compatible = "xlnx,opb-uartlite-1.00.b", },
 	{ .compatible = "xlnx,xps-uartlite-1.00.a", },
 	{}
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c
index 14d10fc..7d2532b 100644
--- a/drivers/tty/serial/ucc_uart.c
+++ b/drivers/tty/serial/ucc_uart.c
@@ -1473,7 +1473,7 @@ static int ucc_uart_remove(struct platform_device *ofdev)
 	return 0;
 }
 
-static struct of_device_id ucc_uart_match[] = {
+static const struct of_device_id ucc_uart_match[] = {
 	{
 		.type = "serial",
 		.compatible = "ucc_uart",
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 8f9c543..09258de 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -1459,7 +1459,7 @@ static int cdns_uart_remove(struct platform_device *pdev)
 }
 
 /* Match table for of_platform binding */
-static struct of_device_id cdns_uart_of_match[] = {
+static const struct of_device_id cdns_uart_of_match[] = {
 	{ .compatible = "xlnx,xuartps", },
 	{ .compatible = "cdns,uart-r1p8", },
 	{}
-- 
2.1.0

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

* Re: [PATCH 05/35 linux-next] tty: constify of_device_id array
  2015-03-16 19:17 ` [PATCH 05/35 linux-next] tty: " Fabian Frederick
@ 2015-03-16 19:20   ` Timur Tabi
       [not found]   ` <1426533469-25458-6-git-send-email-fabf-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
  2015-03-17  8:10   ` Patrice Chotard
  2 siblings, 0 replies; 7+ messages in thread
From: Timur Tabi @ 2015-03-16 19:20 UTC (permalink / raw)
  To: Fabian Frederick, linux-kernel
  Cc: Alexandre Courbot, Barry Song, kernel, Stephen Warren,
	Greg Kroah-Hartman, linuxppc-dev, Patrice Chotard, Michal Simek,
	Thierry Reding, Laxman Dewangan, linux-arm-kernel, linux-serial,
	Srinivas Kandagatla, linux-tegra, Peter Korsgaard, Jiri Slaby,
	Sören Brinkmann, Maxime Coquelin

On 03/16/2015 02:17 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/tty/serial/ucc_uart.c               | 2 +-

For this driver:

Acked-by: Timur Tabi <timur@tabi.org>

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

* Re: [PATCH 05/35 linux-next] tty: constify of_device_id array
       [not found]   ` <1426533469-25458-6-git-send-email-fabf-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
@ 2015-03-16 19:51     ` Peter Korsgaard
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2015-03-16 19:51 UTC (permalink / raw)
  To: Fabian Frederick
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Greg Kroah-Hartman,
	Jiri Slaby, Laxman Dewangan, Stephen Warren, Thierry Reding,
	Alexandre Courbot, Barry Song, Srinivas Kandagatla,
	Maxime Coquelin, Patrice Chotard, Peter Korsgaard, Timur Tabi,
	Michal Simek, Sören Brinkmann,
	linux-serial-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ

>>>>> "Fabian" == Fabian Frederick <fabf-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org> writes:

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

 > Signed-off-by: Fabian Frederick <fabf-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
 > ---

For this:

>  drivers/tty/serial/uartlite.c               | 2 +-

Acked-by: Peter Korsgaard <peter-+2lRwdCCLRT2eFz/2MeuCQ@public.gmane.org>

-- 
Bye, Peter Korsgaard

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

* [PATCH 29/35 linux-next] gpu: constify of_device_id array
       [not found] ` <1426535685-25996-1-git-send-email-fabf@skynet.be>
@ 2015-03-16 19:54   ` Fabian Frederick
       [not found]   ` <1426535685-25996-1-git-send-email-fabf-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Fabian Frederick @ 2015-03-16 19:54 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, Fabian Frederick, Russell King, David Airlie,
	Inki Dae, Joonyoung Shim, Seung-Woo Kim, Kyungmin Park,
	Kukjin Kim, Thierry Reding, Terje Bergström, dri-devel,
	linux-arm-kernel, linux-samsung-soc, linux-tegra

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/gpu/drm/armada/armada_crtc.c    | 2 +-
 drivers/gpu/drm/exynos/exynos_drm_dsi.c | 2 +-
 drivers/gpu/drm/exynos/exynos_hdmi.c    | 2 +-
 drivers/gpu/drm/exynos/exynos_mixer.c   | 2 +-
 drivers/gpu/drm/panel/panel-ld9040.c    | 2 +-
 drivers/gpu/drm/panel/panel-s6e8aa0.c   | 2 +-
 drivers/gpu/drm/sti/sti_dvo.c           | 2 +-
 drivers/gpu/drm/sti/sti_hqvdp.c         | 2 +-
 drivers/gpu/drm/tilcdc/tilcdc_drv.c     | 4 ++--
 drivers/gpu/drm/tilcdc/tilcdc_panel.c   | 2 +-
 drivers/gpu/drm/tilcdc/tilcdc_slave.c   | 4 ++--
 drivers/gpu/drm/tilcdc/tilcdc_tfp410.c  | 4 ++--
 drivers/gpu/host1x/dev.c                | 2 +-
 drivers/gpu/host1x/mipi.c               | 2 +-
 14 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c
index 42d2ffa..517542f 100644
--- a/drivers/gpu/drm/armada/armada_crtc.c
+++ b/drivers/gpu/drm/armada/armada_crtc.c
@@ -1201,7 +1201,7 @@ static int armada_lcd_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id armada_lcd_of_match[] = {
+static const struct of_device_id armada_lcd_of_match[] = {
 	{
 		.compatible	= "marvell,dove-lcd",
 		.data		= &armada510_ops,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index 05fe93d..78afb45 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -330,7 +330,7 @@ static struct exynos_dsi_driver_data exynos5_dsi_driver_data = {
 	.plltmr_reg = 0x58,
 };
 
-static struct of_device_id exynos_dsi_of_match[] = {
+static const struct of_device_id exynos_dsi_of_match[] = {
 	{ .compatible = "samsung,exynos3250-mipi-dsi",
 	  .data = &exynos3_dsi_driver_data },
 	{ .compatible = "samsung,exynos4210-mipi-dsi",
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 229b361..0294402 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -2274,7 +2274,7 @@ err_data:
 	return NULL;
 }
 
-static struct of_device_id hdmi_match_types[] = {
+static const struct of_device_id hdmi_match_types[] = {
 	{
 		.compatible = "samsung,exynos5-hdmi",
 		.data = &exynos5_hdmi_driver_data,
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
index 3518bc4..6297105 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -1224,7 +1224,7 @@ static struct platform_device_id mixer_driver_types[] = {
 	}
 };
 
-static struct of_device_id mixer_match_types[] = {
+static const struct of_device_id mixer_match_types[] = {
 	{
 		.compatible = "samsung,exynos4210-mixer",
 		.data	= &exynos4210_mxr_drv_data,
diff --git a/drivers/gpu/drm/panel/panel-ld9040.c b/drivers/gpu/drm/panel/panel-ld9040.c
index 08cf2c5..0ab5b69 100644
--- a/drivers/gpu/drm/panel/panel-ld9040.c
+++ b/drivers/gpu/drm/panel/panel-ld9040.c
@@ -367,7 +367,7 @@ static int ld9040_remove(struct spi_device *spi)
 	return 0;
 }
 
-static struct of_device_id ld9040_of_match[] = {
+static const struct of_device_id ld9040_of_match[] = {
 	{ .compatible = "samsung,ld9040" },
 	{ }
 };
diff --git a/drivers/gpu/drm/panel/panel-s6e8aa0.c b/drivers/gpu/drm/panel/panel-s6e8aa0.c
index 144b273..3005110 100644
--- a/drivers/gpu/drm/panel/panel-s6e8aa0.c
+++ b/drivers/gpu/drm/panel/panel-s6e8aa0.c
@@ -1041,7 +1041,7 @@ static int s6e8aa0_remove(struct mipi_dsi_device *dsi)
 	return 0;
 }
 
-static struct of_device_id s6e8aa0_of_match[] = {
+static const struct of_device_id s6e8aa0_of_match[] = {
 	{ .compatible = "samsung,s6e8aa0" },
 	{ }
 };
diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
index aeb5070..f619ae2 100644
--- a/drivers/gpu/drm/sti/sti_dvo.c
+++ b/drivers/gpu/drm/sti/sti_dvo.c
@@ -537,7 +537,7 @@ static int sti_dvo_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id dvo_of_match[] = {
+static const struct of_device_id dvo_of_match[] = {
 	{ .compatible = "st,stih407-dvo", },
 	{ /* end node */ }
 };
diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
index b0eb62d..d4324f1 100644
--- a/drivers/gpu/drm/sti/sti_hqvdp.c
+++ b/drivers/gpu/drm/sti/sti_hqvdp.c
@@ -1050,7 +1050,7 @@ static int sti_hqvdp_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id hqvdp_of_match[] = {
+static const struct of_device_id hqvdp_of_match[] = {
 	{ .compatible = "st,stih407-hqvdp", },
 	{ /* end node */ }
 };
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 095fca9..5f7e602 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -47,7 +47,7 @@ void tilcdc_slave_probedefer(bool defered)
 	slave_probing = defered;
 }
 
-static struct of_device_id tilcdc_of_match[];
+static const struct of_device_id tilcdc_of_match[];
 
 static struct drm_framebuffer *tilcdc_fb_create(struct drm_device *dev,
 		struct drm_file *file_priv, struct drm_mode_fb_cmd2 *mode_cmd)
@@ -634,7 +634,7 @@ static int tilcdc_pdev_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id tilcdc_of_match[] = {
+static const struct of_device_id tilcdc_of_match[] = {
 		{ .compatible = "ti,am33xx-tilcdc", },
 		{ },
 };
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
index 7a03158..8a374c7 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
@@ -450,7 +450,7 @@ static int panel_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id panel_of_match[] = {
+static const struct of_device_id panel_of_match[] = {
 		{ .compatible = "ti,tilcdc,panel", },
 		{ },
 };
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_slave.c b/drivers/gpu/drm/tilcdc/tilcdc_slave.c
index 3775fd4..1cab937 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_slave.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_slave.c
@@ -304,7 +304,7 @@ static const struct tilcdc_module_ops slave_module_ops = {
  * Device:
  */
 
-static struct of_device_id slave_of_match[];
+static const struct of_device_id slave_of_match[];
 
 static int slave_probe(struct platform_device *pdev)
 {
@@ -385,7 +385,7 @@ static int slave_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id slave_of_match[] = {
+static const struct of_device_id slave_of_match[] = {
 		{ .compatible = "ti,tilcdc,slave", },
 		{ },
 };
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
index 354c47c..1bd8e81 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
@@ -304,7 +304,7 @@ static const struct tilcdc_module_ops tfp410_module_ops = {
  * Device:
  */
 
-static struct of_device_id tfp410_of_match[];
+static const struct of_device_id tfp410_of_match[];
 
 static int tfp410_probe(struct platform_device *pdev)
 {
@@ -394,7 +394,7 @@ static int tfp410_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id tfp410_of_match[] = {
+static const struct of_device_id tfp410_of_match[] = {
 		{ .compatible = "ti,tilcdc,tfp410", },
 		{ },
 };
diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
index 53d3d1d..f33fd77 100644
--- a/drivers/gpu/host1x/dev.c
+++ b/drivers/gpu/host1x/dev.c
@@ -87,7 +87,7 @@ static const struct host1x_info host1x04_info = {
 	.sync_offset = 0x2100,
 };
 
-static struct of_device_id host1x_of_match[] = {
+static const struct of_device_id host1x_of_match[] = {
 	{ .compatible = "nvidia,tegra124-host1x", .data = &host1x04_info, },
 	{ .compatible = "nvidia,tegra114-host1x", .data = &host1x02_info, },
 	{ .compatible = "nvidia,tegra30-host1x", .data = &host1x01_info, },
diff --git a/drivers/gpu/host1x/mipi.c b/drivers/gpu/host1x/mipi.c
index fbc6ee6..ba54db4 100644
--- a/drivers/gpu/host1x/mipi.c
+++ b/drivers/gpu/host1x/mipi.c
@@ -277,7 +277,7 @@ static const struct tegra_mipi_soc tegra124_mipi_soc = {
 	.num_pads = ARRAY_SIZE(tegra124_mipi_pads),
 };
 
-static struct of_device_id tegra_mipi_of_match[] = {
+static const struct of_device_id tegra_mipi_of_match[] = {
 	{ .compatible = "nvidia,tegra114-mipi", .data = &tegra114_mipi_soc },
 	{ .compatible = "nvidia,tegra124-mipi", .data = &tegra124_mipi_soc },
 	{ },
-- 
2.1.0

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

* [PATCH 30/35 linux-next] devfreq: constify of_device_id array
       [not found]   ` <1426535685-25996-1-git-send-email-fabf-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
@ 2015-03-16 19:54     ` Fabian Frederick
  0 siblings, 0 replies; 7+ messages in thread
From: Fabian Frederick @ 2015-03-16 19:54 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Greg Kroah-Hartman, Fabian Frederick, MyungJoo Ham, Kyungmin Park,
	Kukjin Kim, Stephen Warren, Thierry Reding, Alexandre Courbot,
	linux-pm-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

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

Signed-off-by: Fabian Frederick <fabf-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
---
 drivers/devfreq/event/exynos-ppmu.c | 2 +-
 drivers/devfreq/tegra-devfreq.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c
index ad83473..5afb851 100644
--- a/drivers/devfreq/event/exynos-ppmu.c
+++ b/drivers/devfreq/event/exynos-ppmu.c
@@ -354,7 +354,7 @@ static int exynos_ppmu_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id exynos_ppmu_id_match[] = {
+static const struct of_device_id exynos_ppmu_id_match[] = {
 	{ .compatible = "samsung,exynos-ppmu", },
 	{ /* sentinel */ },
 };
diff --git a/drivers/devfreq/tegra-devfreq.c b/drivers/devfreq/tegra-devfreq.c
index 3479096..244d8db 100644
--- a/drivers/devfreq/tegra-devfreq.c
+++ b/drivers/devfreq/tegra-devfreq.c
@@ -695,7 +695,7 @@ static SIMPLE_DEV_PM_OPS(tegra_devfreq_pm_ops,
 			 tegra_devfreq_suspend,
 			 tegra_devfreq_resume);
 
-static struct of_device_id tegra_devfreq_of_match[] = {
+static const struct of_device_id tegra_devfreq_of_match[] = {
 	{ .compatible = "nvidia,tegra124-actmon" },
 	{ },
 };
-- 
2.1.0

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

* Re: [PATCH 05/35 linux-next] tty: constify of_device_id array
  2015-03-16 19:17 ` [PATCH 05/35 linux-next] tty: " Fabian Frederick
  2015-03-16 19:20   ` Timur Tabi
       [not found]   ` <1426533469-25458-6-git-send-email-fabf-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
@ 2015-03-17  8:10   ` Patrice Chotard
  2 siblings, 0 replies; 7+ messages in thread
From: Patrice Chotard @ 2015-03-17  8:10 UTC (permalink / raw)
  To: Fabian Frederick, linux-kernel
  Cc: Alexandre Courbot, Barry Song, kernel, Stephen Warren,
	Greg Kroah-Hartman, linuxppc-dev, Timur Tabi, Michal Simek,
	Thierry Reding, Laxman Dewangan, linux-arm-kernel, linux-serial,
	Srinivas Kandagatla, linux-tegra, Peter Korsgaard, Jiri Slaby,
	Sören Brinkmann, Maxime Coquelin

Hi Fabian

On 03/16/2015 08:17 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/tty/serial/st-asc.c                 | 2 +-
>
For this driver

Acked-by: Patrice Chotard <patrice.chotard@st.com>

Thanks

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

end of thread, other threads:[~2015-03-17  8:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-16 19:17 [PATCH 00/35 linux-next] constify of_device_id array Fabian Frederick
2015-03-16 19:17 ` [PATCH 05/35 linux-next] tty: " Fabian Frederick
2015-03-16 19:20   ` Timur Tabi
     [not found]   ` <1426533469-25458-6-git-send-email-fabf-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
2015-03-16 19:51     ` Peter Korsgaard
2015-03-17  8:10   ` Patrice Chotard
     [not found] ` <1426535685-25996-1-git-send-email-fabf@skynet.be>
2015-03-16 19:54   ` [PATCH 29/35 linux-next] gpu: " Fabian Frederick
     [not found]   ` <1426535685-25996-1-git-send-email-fabf-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
2015-03-16 19:54     ` [PATCH 30/35 linux-next] devfreq: " Fabian Frederick

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