All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-media@vger.kernel.org
Subject: [PATCH v3 1/9] soc-camera: Don't fail at module init time if no device is present
Date: Wed, 18 Jul 2012 15:53:56 +0200	[thread overview]
Message-ID: <1342619644-5712-2-git-send-email-laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <1342619644-5712-1-git-send-email-laurent.pinchart@ideasonboard.com>

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>
---
 drivers/media/video/soc_camera.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c
index 0421bf9..e7c6809 100644
--- a/drivers/media/video/soc_camera.c
+++ b/drivers/media/video/soc_camera.c
@@ -1518,6 +1518,7 @@ static int __devexit soc_camera_pdrv_remove(struct platform_device *pdev)
 }
 
 static struct platform_driver __refdata soc_camera_pdrv = {
+	.probe = soc_camera_pdrv_probe,
 	.remove  = __devexit_p(soc_camera_pdrv_remove),
 	.driver  = {
 		.name	= "soc-camera-pdrv",
@@ -1527,7 +1528,7 @@ static struct platform_driver __refdata soc_camera_pdrv = {
 
 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)
-- 
1.7.8.6


  reply	other threads:[~2012-07-18 13:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-18 13:53 [PATCH v3 0/9] Miscellaneous soc-camera patches Laurent Pinchart
2012-07-18 13:53 ` Laurent Pinchart [this message]
2012-07-18 13:53 ` [PATCH v3 2/9] soc-camera: Pass the physical device to the power operation Laurent Pinchart
2012-07-18 13:53 ` [PATCH v3 3/9] ov2640: Don't access the device in the g_mbus_fmt operation Laurent Pinchart
2012-07-18 13:53 ` [PATCH v3 4/9] ov772x: " Laurent Pinchart
2012-07-18 13:54 ` [PATCH v3 5/9] tw9910: " Laurent Pinchart
2012-07-18 13:54 ` [PATCH v3 6/9] soc_camera: Don't call .s_power() during probe Laurent Pinchart
2012-07-18 13:54 ` [PATCH v3 7/9] soc-camera: Continue the power off sequence if one of the steps fails Laurent Pinchart
2012-07-18 13:54 ` [PATCH v3 8/9] soc-camera: Add and use soc_camera_power_[on|off]() helper functions Laurent Pinchart
2012-07-20 12:49   ` Guennadi Liakhovetski
2012-07-20 13:19     ` [PATCH v4] " Laurent Pinchart
2012-07-18 13:54 ` [PATCH v3 9/9] soc-camera: Push probe-time power management to drivers Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342619644-5712-2-git-send-email-laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.