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

media: vpif_display: fix section mismatch

Platform drivers can be probed after their init sections have been
discarded (e.g. on probe deferral or manual rebind through sysfs) so the
probe function must not live in init.

Note that commit ffa1b391c61b ("V4L/DVB: vpif_cap/disp: Removed section
mismatch warning") incorrectly suppressed the modpost warning.

Fixes: ffa1b391c61b ("V4L/DVB: vpif_cap/disp: Removed section mismatch warning")
Fixes: e7332e3a552f ("V4L/DVB (12176): davinci/vpif_display: Add VPIF display driver")
Cc: stable@vger.kernel.org # 2.6.32
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Johan Hovold and committed by
Hans Verkuil
59ca64bf 0ef84111

+2 -2
+2 -2
drivers/media/platform/ti/davinci/vpif_display.c
··· 1214 1214 * vpif_probe: This function creates device entries by register itself to the 1215 1215 * V4L2 driver and initializes fields of each channel objects 1216 1216 */ 1217 - static __init int vpif_probe(struct platform_device *pdev) 1217 + static int vpif_probe(struct platform_device *pdev) 1218 1218 { 1219 1219 struct vpif_subdev_info *subdevdata; 1220 1220 struct i2c_adapter *i2c_adap; ··· 1390 1390 1391 1391 static SIMPLE_DEV_PM_OPS(vpif_pm_ops, vpif_suspend, vpif_resume); 1392 1392 1393 - static __refdata struct platform_driver vpif_driver = { 1393 + static struct platform_driver vpif_driver = { 1394 1394 .driver = { 1395 1395 .name = VPIF_DRIVER_NAME, 1396 1396 .pm = &vpif_pm_ops,