Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

can: mpc5xxx_can: fix section type conflict

Since commit:
6d99c4c can: mpc5xxx_can: make data used as *of_device_id.data const

both "struct mpc5xxx_can_data mpc5200_can_data" and "mpc5121_can_data" are
marked as "const" but also as "__devinitdata". This leads to the following
compile error:

drivers/net/can/mscan/mpc5xxx_can.c:383: error: mpc5200_can_data causes a section type conflict
drivers/net/can/mscan/mpc5xxx_can.c:383: error: mpc5200_can_data causes a section type conflict
drivers/net/can/mscan/mpc5xxx_can.c:388: error: mpc5121_can_data causes a section type conflict
drivers/net/can/mscan/mpc5xxx_can.c:388: error: mpc5121_can_data causes a section type conflict

This patch changes the "__devinitdata" to "__devinitconst" and marks the
"struct of_device_id mpc5xxx_can_table" as "const" and "__devinitconst", too.

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

+4 -4
+4 -4
drivers/net/can/mscan/mpc5xxx_can.c
··· 247 247 } 248 248 #endif /* CONFIG_PPC_MPC512x */ 249 249 250 - static struct of_device_id mpc5xxx_can_table[]; 250 + static const struct of_device_id mpc5xxx_can_table[]; 251 251 static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev) 252 252 { 253 253 const struct of_device_id *match; ··· 380 380 } 381 381 #endif 382 382 383 - static const struct mpc5xxx_can_data __devinitdata mpc5200_can_data = { 383 + static const struct mpc5xxx_can_data __devinitconst mpc5200_can_data = { 384 384 .type = MSCAN_TYPE_MPC5200, 385 385 .get_clock = mpc52xx_can_get_clock, 386 386 }; 387 387 388 - static const struct mpc5xxx_can_data __devinitdata mpc5121_can_data = { 388 + static const struct mpc5xxx_can_data __devinitconst mpc5121_can_data = { 389 389 .type = MSCAN_TYPE_MPC5121, 390 390 .get_clock = mpc512x_can_get_clock, 391 391 }; 392 392 393 - static struct of_device_id __devinitdata mpc5xxx_can_table[] = { 393 + static const struct of_device_id __devinitconst mpc5xxx_can_table[] = { 394 394 { .compatible = "fsl,mpc5200-mscan", .data = &mpc5200_can_data, }, 395 395 /* Note that only MPC5121 Rev. 2 (and later) is supported */ 396 396 { .compatible = "fsl,mpc5121-mscan", .data = &mpc5121_can_data, },