[media] soc-camera: Don't fail at module init time if no device is present
The soc-camera module exports functions that are needed by soc-camera client drivers even when not running in soc-camera mode. Replace the platform_driver_probe() with a platform_driver_register() call to avoid module load failures if no soc-camera device is present. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
		
					parent
					
						
							
								a1acb8f9a0
							
						
					
				
			
			
				commit
				
					
						1858c99db4
					
				
			
		
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -1518,6 +1518,7 @@ static int __devexit soc_camera_pdrv_remove(struct platform_device *pdev)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static struct platform_driver __refdata soc_camera_pdrv = {
 | 
					static struct platform_driver __refdata soc_camera_pdrv = {
 | 
				
			||||||
 | 
						.probe = soc_camera_pdrv_probe,
 | 
				
			||||||
	.remove  = __devexit_p(soc_camera_pdrv_remove),
 | 
						.remove  = __devexit_p(soc_camera_pdrv_remove),
 | 
				
			||||||
	.driver  = {
 | 
						.driver  = {
 | 
				
			||||||
		.name	= "soc-camera-pdrv",
 | 
							.name	= "soc-camera-pdrv",
 | 
				
			||||||
| 
						 | 
					@ -1527,7 +1528,7 @@ static struct platform_driver __refdata soc_camera_pdrv = {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int __init soc_camera_init(void)
 | 
					static int __init soc_camera_init(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	return platform_driver_probe(&soc_camera_pdrv, soc_camera_pdrv_probe);
 | 
						return platform_driver_register(&soc_camera_pdrv);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void __exit soc_camera_exit(void)
 | 
					static void __exit soc_camera_exit(void)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue