mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
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 <benh@kernel.crashing.org> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This commit is contained in:
parent
c4dba0119b
commit
215e691c2a
1 changed files with 1 additions and 1 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue