Patchwork [10/25] i2c/mpc: add a const qualifier

login
register
mail settings
Submitter Uwe Kleine-König
Date July 23, 2012, 9:13 a.m.
Message ID <1343034810-3386-11-git-send-email-u.kleine-koenig@pengutronix.de>
Download mbox | patch
Permalink /patch/172591/
State Not Applicable
Headers show

Comments

Uwe Kleine-König - July 23, 2012, 9:13 a.m.
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:

	drivers/i2c/busses/i2c-mpc.c: In function 'fsl_i2c_probe':
	drivers/i2c/busses/i2c-mpc.c:650:31: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-mpc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index b76731e..775062c 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -647,7 +647,7 @@  static int __devinit fsl_i2c_probe(struct platform_device *op)
 	}
 
 	if (match->data) {
-		struct mpc_i2c_data *data = match->data;
+		const struct mpc_i2c_data *data = match->data;
 		data->setup(op->dev.of_node, i2c, clock, data->prescaler);
 	} else {
 		/* Backwards compatibility */