From: Uwe Kleine-König Date: Mon, 21 May 2012 19:57:39 +0000 (+0200) Subject: i2c/mpc: add a const qualifier X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=215e691c2ac9104dd6dfbdd291366ad4c202b7b6;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git i2c/mpc: add a const qualifier 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] Acked-by: Benjamin Herrenschmidt Signed-off-by: Uwe Kleine-König --- diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index b76731edbf10..775062c95a2c 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 */