* [PATCH 0/9] make struct of_device_id.data const
[not found] <1342182734-321-1-git-send-email-y>
@ 2012-07-13 12:32 ` y
2012-07-13 12:32 ` [PATCH 01/11] spi/imx: make spi_imx_data.devtype_data member point to const data y
` (21 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: y @ 2012-07-13 12:32 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann
Cc: devicetree-discuss, Rob Herring, linux-arm-kernel, kernel,
Uwe Kleine-König
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Uwe Kleine-König (9):
spi/imx: make spi_imx_data.devtype_data member point to const data
serial/imx: make imx_port.devdata member point to const data
ARM: cache-l2x0: add a const qualifier
misc/atmel_tc: make atmel_tc.tcb_config member point to const data
gpio/gpio-omap.c: add a const qualifier
i2c/i2c-omap: add a const qualifier
spi/spi-omap2-mcspi: add a const qualifier
of: add const to struct of_device_id.data
gpio/gpio-omap: make platformdata used as of_device_id.data const
arch/arm/mm/cache-l2x0.c | 2 +-
drivers/gpio/gpio-omap.c | 8 ++++----
drivers/i2c/busses/i2c-omap.c | 3 ++-
drivers/spi/spi-imx.c | 2 +-
drivers/spi/spi-omap2-mcspi.c | 2 +-
drivers/tty/serial/imx.c | 2 +-
include/linux/atmel_tc.h | 2 +-
include/linux/mod_devicetable.h | 2 +-
8 files changed, 12 insertions(+), 11 deletions(-)
--
1.7.10
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 01/11] spi/imx: make spi_imx_data.devtype_data member point to const data
[not found] <1342182734-321-1-git-send-email-y>
2012-07-13 12:32 ` [PATCH 0/9] make struct of_device_id.data const y
@ 2012-07-13 12:32 ` y
2012-07-13 12:32 ` y
` (20 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: y @ 2012-07-13 12:32 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann
Cc: devicetree-discuss, Rob Herring, kernel, Uwe Kleine-König,
spi-devel-general, linux-arm-kernel
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This prepares of_device_id.data becoming const. Without this change the
following warning would occur:
drivers/spi/spi-imx.c: In function spi_imx_probe:
drivers/spi/spi-imx.c:814:24: warning: assignment discards const qualifier from pointer target type [enabled by default]
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: spi-devel-general@lists.sourceforge.net
---
drivers/spi/spi-imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index 47877d6..b09fc77 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -97,7 +97,7 @@ struct spi_imx_data {
const void *tx_buf;
unsigned int txfifo; /* number of words pushed in tx FIFO */
- struct spi_imx_devtype_data *devtype_data;
+ const struct spi_imx_devtype_data *devtype_data;
int chipselect[0];
};
--
1.7.10.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 01/11] spi/imx: make spi_imx_data.devtype_data member point to const data
[not found] <1342182734-321-1-git-send-email-y>
2012-07-13 12:32 ` [PATCH 0/9] make struct of_device_id.data const y
2012-07-13 12:32 ` [PATCH 01/11] spi/imx: make spi_imx_data.devtype_data member point to const data y
@ 2012-07-13 12:32 ` y
2012-07-13 12:32 ` [PATCH 02/11] serial/imx: make imx_port.devdata " y
` (19 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: y @ 2012-07-13 12:32 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, Uwe Kleine-König,
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This prepares of_device_id.data becoming const. Without this change the
following warning would occur:
drivers/spi/spi-imx.c: In function spi_imx_probe:
drivers/spi/spi-imx.c:814:24: warning: assignment discards const qualifier from pointer target type [enabled by default]
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: spi-devel-general@lists.sourceforge.net
---
drivers/spi/spi-imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index 47877d6..b09fc77 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -97,7 +97,7 @@ struct spi_imx_data {
const void *tx_buf;
unsigned int txfifo; /* number of words pushed in tx FIFO */
- struct spi_imx_devtype_data *devtype_data;
+ const struct spi_imx_devtype_data *devtype_data;
int chipselect[0];
};
--
1.7.10.4
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 02/11] serial/imx: make imx_port.devdata member point to const data
[not found] <1342182734-321-1-git-send-email-y>
` (2 preceding siblings ...)
2012-07-13 12:32 ` y
@ 2012-07-13 12:32 ` y
2012-07-13 12:32 ` y
` (18 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: y @ 2012-07-13 12:32 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann
Cc: linux-serial, Greg Kroah-Hartman, devicetree-discuss, Rob Herring,
kernel, Uwe Kleine-König, linux-arm-kernel, Alan Cox
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This prepares of_device_id.data becoming const. Without this change the
following warning would occur:
drivers/tty/serial/imx.c: In function 'serial_imx_probe_dt':
drivers/tty/serial/imx.c:1430:17: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-serial@vger.kernel.org
---
drivers/tty/serial/imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 4ef7473..0af4eec 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -207,7 +207,7 @@ struct imx_port {
unsigned short trcv_delay; /* transceiver delay */
struct clk *clk_ipg;
struct clk *clk_per;
- struct imx_uart_data *devdata;
+ const struct imx_uart_data *devdata;
};
struct imx_port_ucrs {
--
1.7.10.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 02/11] serial/imx: make imx_port.devdata member point to const data
[not found] <1342182734-321-1-git-send-email-y>
` (3 preceding siblings ...)
2012-07-13 12:32 ` [PATCH 02/11] serial/imx: make imx_port.devdata " y
@ 2012-07-13 12:32 ` y
2012-07-13 12:32 ` [PATCH 03/11] ARM: cache-l2x0: add a const qualifier y
` (17 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: y @ 2012-07-13 12:32 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann
Cc: kernel, linux-arm-kernel, devicetree-discuss, Rob Herring,
Uwe Kleine-König, Alan Cox, Greg Kroah-Hartman, linux-serial
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This prepares of_device_id.data becoming const. Without this change the
following warning would occur:
drivers/tty/serial/imx.c: In function 'serial_imx_probe_dt':
drivers/tty/serial/imx.c:1430:17: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-serial@vger.kernel.org
---
drivers/tty/serial/imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 4ef7473..0af4eec 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -207,7 +207,7 @@ struct imx_port {
unsigned short trcv_delay; /* transceiver delay */
struct clk *clk_ipg;
struct clk *clk_per;
- struct imx_uart_data *devdata;
+ const struct imx_uart_data *devdata;
};
struct imx_port_ucrs {
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 03/11] ARM: cache-l2x0: add a const qualifier
[not found] <1342182734-321-1-git-send-email-y>
` (4 preceding siblings ...)
2012-07-13 12:32 ` y
@ 2012-07-13 12:32 ` y
2012-07-13 12:32 ` [PATCH 04/11] misc/atmel_tc: make atmel_tc.tcb_config member point to const data y
` (16 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: y @ 2012-07-13 12:32 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann
Cc: Russell King, devicetree-discuss, Rob Herring, kernel,
Uwe Kleine-König, linux-arm-kernel
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This prepares of_device_id.data becoming const. Without this change the
following warning would occur:
arch/arm/mm/cache-l2x0.c: In function 'l2x0_of_init':
arch/arm/mm/cache-l2x0.c:573:7: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
though.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
---
arch/arm/mm/cache-l2x0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 2a8e380..577baf7 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -554,7 +554,7 @@ static const struct of_device_id l2x0_ids[] __initconst = {
int __init l2x0_of_init(u32 aux_val, u32 aux_mask)
{
struct device_node *np;
- struct l2x0_of_data *data;
+ const struct l2x0_of_data *data;
struct resource res;
np = of_find_matching_node(NULL, l2x0_ids);
--
1.7.10.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 04/11] misc/atmel_tc: make atmel_tc.tcb_config member point to const data
[not found] <1342182734-321-1-git-send-email-y>
` (5 preceding siblings ...)
2012-07-13 12:32 ` [PATCH 03/11] ARM: cache-l2x0: add a const qualifier y
@ 2012-07-13 12:32 ` y
2012-07-13 12:32 ` [PATCH 05/11] gpio/gpio-omap.c: add a const qualifier y
` (15 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: y @ 2012-07-13 12:32 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann
Cc: Greg Kroah-Hartman, devicetree-discuss, Nicolas Ferre,
Rob Herring, kernel, Uwe Kleine-König, linux-arm-kernel
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This prepares of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/misc/atmel_tclib.c: In function 'tc_probe':
drivers/misc/atmel_tclib.c:170: warning: assignment discards qualifiers from pointer target type
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Hello,
btw, get_maintainer.pl suggested to Cc:
linux-atm-general@lists.sourceforge.net but not the Atmel people because
include/linux/atmel_tc.h matches include/linux/atm*.
Best regards
Uwe
include/linux/atmel_tc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/atmel_tc.h b/include/linux/atmel_tc.h
index 1d14b1dc..89a931b 100644
--- a/include/linux/atmel_tc.h
+++ b/include/linux/atmel_tc.h
@@ -63,7 +63,7 @@ struct atmel_tc {
struct platform_device *pdev;
struct resource *iomem;
void __iomem *regs;
- struct atmel_tcb_config *tcb_config;
+ const struct atmel_tcb_config *tcb_config;
int irq[3];
struct clk *clk[3];
struct list_head node;
--
1.7.10.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 05/11] gpio/gpio-omap.c: add a const qualifier
[not found] <1342182734-321-1-git-send-email-y>
` (6 preceding siblings ...)
2012-07-13 12:32 ` [PATCH 04/11] misc/atmel_tc: make atmel_tc.tcb_config member point to const data y
@ 2012-07-13 12:32 ` y
2012-07-13 12:32 ` [PATCH 06/11] i2c/i2c-omap: " y
` (14 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: y @ 2012-07-13 12:32 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann
Cc: Linus Walleij, devicetree-discuss, Rob Herring, kernel,
Uwe Kleine-König, linux-arm-kernel
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This prepares of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/gpio/gpio-omap.c: In function 'omap_gpio_probe':
drivers/gpio/gpio-omap.c:1060: warning: assignment discards qualifiers from pointer target type
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Linus Walleij <linus.walleij@stericsson.com>
---
drivers/gpio/gpio-omap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index c4ed172..019cb7b 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1050,7 +1050,7 @@ static int __devinit omap_gpio_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct device_node *node = dev->of_node;
const struct of_device_id *match;
- struct omap_gpio_platform_data *pdata;
+ const struct omap_gpio_platform_data *pdata;
struct resource *res;
struct gpio_bank *bank;
int ret = 0;
--
1.7.10.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 06/11] i2c/i2c-omap: add a const qualifier
[not found] <1342182734-321-1-git-send-email-y>
` (7 preceding siblings ...)
2012-07-13 12:32 ` [PATCH 05/11] gpio/gpio-omap.c: add a const qualifier y
@ 2012-07-13 12:32 ` y
2012-07-13 12:32 ` y
` (13 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: y @ 2012-07-13 12:32 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann
Cc: kernel-bIcnvbaLZ9MEGnE8C9+IrQ,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring,
Uwe Kleine-König, Tony Lindgren, Wolfram Sang,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-i2c-u79uwXL29TY76Z2rM5mHXA
From: Uwe Kleine-König <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
This prepares of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/i2c/busses/i2c-omap.c: In function 'omap_i2c_probe':
drivers/i2c/busses/i2c-omap.c:1025: warning: assignment discards qualifiers from pointer target type
Signed-off-by: Uwe Kleine-König <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
Cc: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---
drivers/i2c/busses/i2c-omap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 801df60..4fc585d 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -987,7 +987,8 @@ omap_i2c_probe(struct platform_device *pdev)
struct omap_i2c_dev *dev;
struct i2c_adapter *adap;
struct resource *mem, *irq, *ioarea;
- struct omap_i2c_bus_platform_data *pdata = pdev->dev.platform_data;
+ const struct omap_i2c_bus_platform_data *pdata =
+ pdev->dev.platform_data;
struct device_node *node = pdev->dev.of_node;
const struct of_device_id *match;
irq_handler_t isr;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 06/11] i2c/i2c-omap: add a const qualifier
[not found] <1342182734-321-1-git-send-email-y>
` (8 preceding siblings ...)
2012-07-13 12:32 ` [PATCH 06/11] i2c/i2c-omap: " y
@ 2012-07-13 12:32 ` y
2012-07-13 12:32 ` y
` (12 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: y @ 2012-07-13 12:32 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann
Cc: Tony Lindgren, devicetree-discuss, Wolfram Sang, Rob Herring,
linux-i2c, kernel, Uwe Kleine-König, linux-omap,
linux-arm-kernel
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This prepares of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/i2c/busses/i2c-omap.c: In function 'omap_i2c_probe':
drivers/i2c/busses/i2c-omap.c:1025: warning: assignment discards qualifiers from pointer target type
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: linux-omap@vger.kernel.org
Cc: linux-i2c@vger.kernel.org
---
drivers/i2c/busses/i2c-omap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 801df60..4fc585d 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -987,7 +987,8 @@ omap_i2c_probe(struct platform_device *pdev)
struct omap_i2c_dev *dev;
struct i2c_adapter *adap;
struct resource *mem, *irq, *ioarea;
- struct omap_i2c_bus_platform_data *pdata = pdev->dev.platform_data;
+ const struct omap_i2c_bus_platform_data *pdata =
+ pdev->dev.platform_data;
struct device_node *node = pdev->dev.of_node;
const struct of_device_id *match;
irq_handler_t isr;
--
1.7.10.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 06/11] i2c/i2c-omap: add a const qualifier
[not found] <1342182734-321-1-git-send-email-y>
` (9 preceding siblings ...)
2012-07-13 12:32 ` y
@ 2012-07-13 12:32 ` y
2012-07-13 12:32 ` [PATCH 07/11] dmaengine: at_hdmac: add a few const qualifiers y
` (11 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: y @ 2012-07-13 12:32 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann
Cc: kernel, linux-arm-kernel, devicetree-discuss, Rob Herring,
Uwe Kleine-König, Tony Lindgren, Wolfram Sang, linux-omap,
linux-i2c
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This prepares of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/i2c/busses/i2c-omap.c: In function 'omap_i2c_probe':
drivers/i2c/busses/i2c-omap.c:1025: warning: assignment discards qualifiers from pointer target type
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: linux-omap@vger.kernel.org
Cc: linux-i2c@vger.kernel.org
---
drivers/i2c/busses/i2c-omap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 801df60..4fc585d 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -987,7 +987,8 @@ omap_i2c_probe(struct platform_device *pdev)
struct omap_i2c_dev *dev;
struct i2c_adapter *adap;
struct resource *mem, *irq, *ioarea;
- struct omap_i2c_bus_platform_data *pdata = pdev->dev.platform_data;
+ const struct omap_i2c_bus_platform_data *pdata =
+ pdev->dev.platform_data;
struct device_node *node = pdev->dev.of_node;
const struct of_device_id *match;
irq_handler_t isr;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 07/11] dmaengine: at_hdmac: add a few const qualifiers
[not found] <1342182734-321-1-git-send-email-y>
` (10 preceding siblings ...)
2012-07-13 12:32 ` y
@ 2012-07-13 12:32 ` y
2012-07-13 12:32 ` [PATCH 08/11] spi/spi-omap2-mcspi: add a const qualifier y
` (10 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: y @ 2012-07-13 12:32 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann
Cc: Vinod Koul, devicetree-discuss, Nicolas Ferre, Rob Herring,
kernel, Uwe Kleine-König, Dan Williams, linux-arm-kernel
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This prepares of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/dma/at_hdmac.c: In function 'at_dma_get_driver_data':
drivers/dma/at_hdmac.c:1228: warning: return discards qualifiers from pointer target type
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
---
drivers/dma/at_hdmac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index 7292aa8..7e9d265 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -1217,7 +1217,7 @@ static const struct platform_device_id atdma_devtypes[] = {
}
};
-static inline struct at_dma_platform_data * __init at_dma_get_driver_data(
+static inline const struct at_dma_platform_data * __init at_dma_get_driver_data(
struct platform_device *pdev)
{
if (pdev->dev.of_node) {
@@ -1255,7 +1255,7 @@ static int __init at_dma_probe(struct platform_device *pdev)
int irq;
int err;
int i;
- struct at_dma_platform_data *plat_dat;
+ const struct at_dma_platform_data *plat_dat;
/* setup platform data for each SoC */
dma_cap_set(DMA_MEMCPY, at91sam9rl_config.cap_mask);
--
1.7.10.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 08/11] spi/spi-omap2-mcspi: add a const qualifier
[not found] <1342182734-321-1-git-send-email-y>
` (11 preceding siblings ...)
2012-07-13 12:32 ` [PATCH 07/11] dmaengine: at_hdmac: add a few const qualifiers y
@ 2012-07-13 12:32 ` y
2012-07-13 12:32 ` y
` (9 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: y @ 2012-07-13 12:32 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann
Cc: devicetree-discuss, Rob Herring, kernel, Uwe Kleine-König,
spi-devel-general, linux-arm-kernel
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This prepares of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/spi/spi-omap2-mcspi.c: In function 'omap2_mcspi_probe':
drivers/spi/spi-omap2-mcspi.c:1118: warning: assignment discards qualifiers from pointer target type
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: spi-devel-general@lists.sourceforge.net
---
drivers/spi/spi-omap2-mcspi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 0c73dd4..3455769 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1087,7 +1087,7 @@ MODULE_DEVICE_TABLE(of, omap_mcspi_of_match);
static int __devinit omap2_mcspi_probe(struct platform_device *pdev)
{
struct spi_master *master;
- struct omap2_mcspi_platform_config *pdata;
+ const struct omap2_mcspi_platform_config *pdata;
struct omap2_mcspi *mcspi;
struct resource *r;
int status = 0, i;
--
1.7.10.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 08/11] spi/spi-omap2-mcspi: add a const qualifier
[not found] <1342182734-321-1-git-send-email-y>
` (12 preceding siblings ...)
2012-07-13 12:32 ` [PATCH 08/11] spi/spi-omap2-mcspi: add a const qualifier y
@ 2012-07-13 12:32 ` y
2012-07-13 12:32 ` [PATCH 09/11] mmc/omap_hsmmc: " y
` (8 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: y @ 2012-07-13 12:32 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, Uwe Kleine-König,
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This prepares of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/spi/spi-omap2-mcspi.c: In function 'omap2_mcspi_probe':
drivers/spi/spi-omap2-mcspi.c:1118: warning: assignment discards qualifiers from pointer target type
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: spi-devel-general@lists.sourceforge.net
---
drivers/spi/spi-omap2-mcspi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 0c73dd4..3455769 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1087,7 +1087,7 @@ MODULE_DEVICE_TABLE(of, omap_mcspi_of_match);
static int __devinit omap2_mcspi_probe(struct platform_device *pdev)
{
struct spi_master *master;
- struct omap2_mcspi_platform_config *pdata;
+ const struct omap2_mcspi_platform_config *pdata;
struct omap2_mcspi *mcspi;
struct resource *r;
int status = 0, i;
--
1.7.10.4
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 09/11] mmc/omap_hsmmc: add a const qualifier
[not found] <1342182734-321-1-git-send-email-y>
` (13 preceding siblings ...)
2012-07-13 12:32 ` y
@ 2012-07-13 12:32 ` y
2012-07-13 12:32 ` y
` (7 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: y @ 2012-07-13 12:32 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann
Cc: kernel, linux-arm-kernel, devicetree-discuss, Rob Herring,
Uwe Kleine-König, Chris Ball, Venkatraman S, Balaji T K,
Rajendra Nayak, Adrian Hunter, linux-omap, linux-mmc
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This prepares of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_probe':
drivers/mmc/host/omap_hsmmc.c:1808: warning: initialization discards qualifiers from pointer target type
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Chris Ball <cjb@laptop.org>
Cc: Venkatraman S <svenkatr@ti.com>
Cc: Balaji T K <balajitk@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: linux-omap@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
---
drivers/mmc/host/omap_hsmmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 389a3ee..5bcd043 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1805,7 +1805,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
if (match) {
pdata = of_get_hsmmc_pdata(&pdev->dev);
if (match->data) {
- u16 *offsetp = match->data;
+ const u16 *offsetp = match->data;
pdata->reg_offset = *offsetp;
}
}
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 09/11] mmc/omap_hsmmc: add a const qualifier
[not found] <1342182734-321-1-git-send-email-y>
` (14 preceding siblings ...)
2012-07-13 12:32 ` [PATCH 09/11] mmc/omap_hsmmc: " y
@ 2012-07-13 12:32 ` y
2012-07-13 12:32 ` y
` (6 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: y @ 2012-07-13 12:32 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann
Cc: kernel, linux-arm-kernel, devicetree-discuss, Rob Herring,
Uwe Kleine-König, Chris Ball, Venkatraman S, Balaji T K,
Rajendra Nayak, Adrian Hunter, linux-omap, linux-mmc
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This prepares of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_probe':
drivers/mmc/host/omap_hsmmc.c:1808: warning: initialization discards qualifiers from pointer target type
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Chris Ball <cjb@laptop.org>
Cc: Venkatraman S <svenkatr@ti.com>
Cc: Balaji T K <balajitk@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: linux-omap@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
---
drivers/mmc/host/omap_hsmmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 389a3ee..5bcd043 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1805,7 +1805,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
if (match) {
pdata = of_get_hsmmc_pdata(&pdev->dev);
if (match->data) {
- u16 *offsetp = match->data;
+ const u16 *offsetp = match->data;
pdata->reg_offset = *offsetp;
}
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 09/11] mmc/omap_hsmmc: add a const qualifier
[not found] <1342182734-321-1-git-send-email-y>
` (15 preceding siblings ...)
2012-07-13 12:32 ` y
@ 2012-07-13 12:32 ` y
2012-07-13 12:32 ` [PATCH 10/11] of: add const to struct of_device_id.data y
` (5 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: y @ 2012-07-13 12:32 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann
Cc: Balaji T K, devicetree-discuss, Rajendra Nayak, linux-mmc,
Adrian Hunter, Rob Herring, linux-omap, kernel,
Uwe Kleine-König, Chris Ball, linux-arm-kernel
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This prepares of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_probe':
drivers/mmc/host/omap_hsmmc.c:1808: warning: initialization discards qualifiers from pointer target type
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Chris Ball <cjb@laptop.org>
Cc: Venkatraman S <svenkatr@ti.com>
Cc: Balaji T K <balajitk@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: linux-omap@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
---
drivers/mmc/host/omap_hsmmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 389a3ee..5bcd043 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1805,7 +1805,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
if (match) {
pdata = of_get_hsmmc_pdata(&pdev->dev);
if (match->data) {
- u16 *offsetp = match->data;
+ const u16 *offsetp = match->data;
pdata->reg_offset = *offsetp;
}
}
--
1.7.10.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 10/11] of: add const to struct of_device_id.data
[not found] <1342182734-321-1-git-send-email-y>
` (16 preceding siblings ...)
2012-07-13 12:32 ` y
@ 2012-07-13 12:32 ` y
2012-07-13 12:32 ` [PATCH 11/11] gpio/gpio-omap: make platformdata used as of_device_id.data const y
` (4 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: y @ 2012-07-13 12:32 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann
Cc: devicetree-discuss, Greg Kroah-Hartman, Rob Herring, kernel,
Uwe Kleine-König, linux-arm-kernel
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Drivers should never need to modify the data of a device id. So it can
be const which in turn allows more consts in the driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
---
include/linux/mod_devicetable.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 5db9382..98fb3fe 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -224,7 +224,7 @@ struct of_device_id
char type[32];
char compatible[128];
#ifdef __KERNEL__
- void *data;
+ const void *data;
#else
kernel_ulong_t data;
#endif
--
1.7.10.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 11/11] gpio/gpio-omap: make platformdata used as of_device_id.data const
[not found] <1342182734-321-1-git-send-email-y>
` (17 preceding siblings ...)
2012-07-13 12:32 ` [PATCH 10/11] of: add const to struct of_device_id.data y
@ 2012-07-13 12:32 ` y
2012-07-13 12:39 ` [PATCH 00/11] make struct " Uwe Kleine-König
` (3 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: y @ 2012-07-13 12:32 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann
Cc: Linus Walleij, devicetree-discuss, Rob Herring, kernel,
Uwe Kleine-König, linux-arm-kernel
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Linus Walleij <linus.walleij@stericsson.com>
---
drivers/gpio/gpio-omap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 019cb7b..12ab547 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1430,19 +1430,19 @@ static struct omap_gpio_reg_offs omap4_gpio_regs = {
.fallingdetect = OMAP4_GPIO_FALLINGDETECT,
};
-static struct omap_gpio_platform_data omap2_pdata = {
+const static struct omap_gpio_platform_data omap2_pdata = {
.regs = &omap2_gpio_regs,
.bank_width = 32,
.dbck_flag = false,
};
-static struct omap_gpio_platform_data omap3_pdata = {
+const static struct omap_gpio_platform_data omap3_pdata = {
.regs = &omap2_gpio_regs,
.bank_width = 32,
.dbck_flag = true,
};
-static struct omap_gpio_platform_data omap4_pdata = {
+const static struct omap_gpio_platform_data omap4_pdata = {
.regs = &omap4_gpio_regs,
.bank_width = 32,
.dbck_flag = true,
--
1.7.10.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH 00/11] make struct of_device_id.data const
[not found] <1342182734-321-1-git-send-email-y>
` (18 preceding siblings ...)
2012-07-13 12:32 ` [PATCH 11/11] gpio/gpio-omap: make platformdata used as of_device_id.data const y
@ 2012-07-13 12:39 ` Uwe Kleine-König
2012-07-13 12:41 ` Rob Herring
` (2 subsequent siblings)
22 siblings, 0 replies; 32+ messages in thread
From: Uwe Kleine-König @ 2012-07-13 12:39 UTC (permalink / raw)
To: Grant Likely, Arnd Bergmann, kernel-bIcnvbaLZ9MEGnE8C9+IrQ,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring
Cc: Russell King, Linus Walleij, Vinod Koul, Greg Kroah-Hartman,
linux-mmc-u79uwXL29TY76Z2rM5mHXA, Adrian Hunter, Wolfram Sang,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA,
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Dan Williams,
Chris Ball, Balaji T K, Alan Cox
Hello,
On Fri, Jul 13, 2012 at 02:32:02PM +0200, y@pengutronix.de wrote:
This is utter non-sense, it was me who sent these mails (and pressed 'y'
when git send-email asked if "Uwe Kleine-König
<u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>" is the right sender). Please make sure
to correct this when replying to the patches.
Sorry for the inconvenience.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 00/11] make struct of_device_id.data const
[not found] <1342182734-321-1-git-send-email-y>
` (19 preceding siblings ...)
2012-07-13 12:39 ` [PATCH 00/11] make struct " Uwe Kleine-König
@ 2012-07-13 12:41 ` Rob Herring
[not found] ` <5000175E.4070702-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[not found] ` <1342182734-321-6-git-send-email-y>
[not found] ` <1342182734-321-9-git-send-email-y>
22 siblings, 1 reply; 32+ messages in thread
From: Rob Herring @ 2012-07-13 12:41 UTC (permalink / raw)
To: y
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, Uwe Kleine-König,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On 07/13/2012 07:32 AM, y@pengutronix.de wrote:
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>
> Hello,
>
> this series' goal is to make struct of_device_id.data const.
> Conceptually a driver must not modify the data contained there so making
> it const is the right thing.
>
> This change might introduce warnings because drivers don't use const to
> access the data pointed to by of_device_id.data. In most cases the fix
> is to add some consts.
>
> This series (apart from adding this const in patch 10) fixes all drivers
> covered by all arm defconfigs (based on v3.5-rc6).
>
What about other arches?
Rob
> There is one exception though:
> drivers/regulator/twl-regulator.c (build in omap2plus_defconfig) now
> issues:
>
> drivers/regulator/twl-regulator.c: In function 'twlreg_probe':
> drivers/regulator/twl-regulator.c:1181: warning: assignment discards qualifiers from pointer target type
> drivers/regulator/twl-regulator.c:1190: warning: assignment discards qualifiers from pointer target type
>
> that is because this driver really modifies his .of_match_table in the
> precence of a traditionally probed device.
> I didn't check deeply, but probably the easiest fix is to remove
> traditional platform support. Don't know if omap is ready for that
> though.
>
> And also patch 11 adds some more consts that are possible now after
> patch 10.
>
> This series is available in my git tree at:
>
> git://git.pengutronix.de/git/ukl/linux.git ofdeviceiddata
>
> Best regards
> Uwe
>
> Uwe Kleine-König (11):
> spi/imx: make spi_imx_data.devtype_data member point to const data
> serial/imx: make imx_port.devdata member point to const data
> ARM: cache-l2x0: add a const qualifier
> misc/atmel_tc: make atmel_tc.tcb_config member point to const data
> gpio/gpio-omap.c: add a const qualifier
> i2c/i2c-omap: add a const qualifier
> dmaengine: at_hdmac: add a few const qualifiers
> spi/spi-omap2-mcspi: add a const qualifier
> mmc/omap_hsmmc: add a const qualifier
> of: add const to struct of_device_id.data
> gpio/gpio-omap: make platformdata used as of_device_id.data const
>
> arch/arm/mm/cache-l2x0.c | 2 +-
> drivers/dma/at_hdmac.c | 4 ++--
> drivers/gpio/gpio-omap.c | 8 ++++----
> drivers/i2c/busses/i2c-omap.c | 3 ++-
> drivers/mmc/host/omap_hsmmc.c | 2 +-
> drivers/spi/spi-imx.c | 2 +-
> drivers/spi/spi-omap2-mcspi.c | 2 +-
> drivers/tty/serial/imx.c | 2 +-
> include/linux/atmel_tc.h | 2 +-
> include/linux/mod_devicetable.h | 2 +-
> 10 files changed, 15 insertions(+), 14 deletions(-)
>
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
^ permalink raw reply [flat|nested] 32+ messages in thread
[parent not found: <1342182734-321-6-git-send-email-y>]
* Re: [PATCH 04/11] misc/atmel_tc: make atmel_tc.tcb_config member point to const data
[not found] ` <1342182734-321-6-git-send-email-y>
@ 2012-07-13 13:40 ` Nicolas Ferre
0 siblings, 0 replies; 32+ messages in thread
From: Nicolas Ferre @ 2012-07-13 13:40 UTC (permalink / raw)
Cc: Greg Kroah-Hartman, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
Rob Herring, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, Uwe Kleine-König,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On 07/13/2012 02:32 PM, y@pengutronix.de :
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>
> This prepares of_device_id.data becoming const. Without this change
> the following warning would occur:
>
> drivers/misc/atmel_tclib.c: In function 'tc_probe':
> drivers/misc/atmel_tclib.c:170: warning: assignment discards qualifiers from pointer target type
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Thanks Uwe!
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> Hello,
>
> btw, get_maintainer.pl suggested to Cc:
> linux-atm-general@lists.sourceforge.net but not the Atmel people because
> include/linux/atmel_tc.h matches include/linux/atm*.
Ah, ok, good to know. I will try to update MAINTAINERS file for this.
Bye,
> Best regards
> Uwe
> include/linux/atmel_tc.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/atmel_tc.h b/include/linux/atmel_tc.h
> index 1d14b1dc..89a931b 100644
> --- a/include/linux/atmel_tc.h
> +++ b/include/linux/atmel_tc.h
> @@ -63,7 +63,7 @@ struct atmel_tc {
> struct platform_device *pdev;
> struct resource *iomem;
> void __iomem *regs;
> - struct atmel_tcb_config *tcb_config;
> + const struct atmel_tcb_config *tcb_config;
> int irq[3];
> struct clk *clk[3];
> struct list_head node;
>
--
Nicolas Ferre
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
^ permalink raw reply [flat|nested] 32+ messages in thread
[parent not found: <1342182734-321-9-git-send-email-y>]
* Re: [PATCH 07/11] dmaengine: at_hdmac: add a few const qualifiers
[not found] ` <1342182734-321-9-git-send-email-y>
@ 2012-07-13 13:54 ` Nicolas Ferre
2012-07-16 6:38 ` Vinod Koul
1 sibling, 0 replies; 32+ messages in thread
From: Nicolas Ferre @ 2012-07-13 13:54 UTC (permalink / raw)
Cc: Vinod Koul, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
Rob Herring, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, Uwe Kleine-König,
Dan Williams, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On 07/13/2012 02:32 PM, y@pengutronix.de :
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>
> This prepares of_device_id.data becoming const. Without this change
> the following warning would occur:
>
> drivers/dma/at_hdmac.c: In function 'at_dma_get_driver_data':
> drivers/dma/at_hdmac.c:1228: warning: return discards qualifiers from pointer target type
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Vinod Koul <vinod.koul@intel.com>
> ---
> drivers/dma/at_hdmac.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
> index 7292aa8..7e9d265 100644
> --- a/drivers/dma/at_hdmac.c
> +++ b/drivers/dma/at_hdmac.c
> @@ -1217,7 +1217,7 @@ static const struct platform_device_id atdma_devtypes[] = {
> }
> };
>
> -static inline struct at_dma_platform_data * __init at_dma_get_driver_data(
> +static inline const struct at_dma_platform_data * __init at_dma_get_driver_data(
> struct platform_device *pdev)
> {
> if (pdev->dev.of_node) {
> @@ -1255,7 +1255,7 @@ static int __init at_dma_probe(struct platform_device *pdev)
> int irq;
> int err;
> int i;
> - struct at_dma_platform_data *plat_dat;
> + const struct at_dma_platform_data *plat_dat;
>
> /* setup platform data for each SoC */
> dma_cap_set(DMA_MEMCPY, at91sam9rl_config.cap_mask);
>
--
Nicolas Ferre
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 07/11] dmaengine: at_hdmac: add a few const qualifiers
[not found] ` <1342182734-321-9-git-send-email-y>
2012-07-13 13:54 ` [PATCH 07/11] dmaengine: at_hdmac: add a few const qualifiers Nicolas Ferre
@ 2012-07-16 6:38 ` Vinod Koul
1 sibling, 0 replies; 32+ messages in thread
From: Vinod Koul @ 2012-07-16 6:38 UTC (permalink / raw)
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, Uwe Kleine-König,
Dan Williams, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On Fri, 2012-07-13 at 14:32 +0200, y@pengutronix.de wrote:
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>
> This prepares of_device_id.data becoming const. Without this change
> the following warning would occur:
>
> drivers/dma/at_hdmac.c: In function 'at_dma_get_driver_data':
> drivers/dma/at_hdmac.c:1228: warning: return discards qualifiers from pointer target type
Applied, thanks.
By now, you should know git-send-mail asks for sender name and don't hit
"y". Bitten once, am careful about it :D
--
~Vinod
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
^ permalink raw reply [flat|nested] 32+ messages in thread