From patchwork Fri May 15 17:19:20 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 24136 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4FHIkie031122 for ; Fri, 15 May 2009 17:19:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753057AbZEORTJ (ORCPT ); Fri, 15 May 2009 13:19:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753988AbZEORTI (ORCPT ); Fri, 15 May 2009 13:19:08 -0400 Received: from mail.gmx.net ([213.165.64.20]:35790 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753057AbZEORTH (ORCPT ); Fri, 15 May 2009 13:19:07 -0400 Received: (qmail invoked by alias); 15 May 2009 17:19:07 -0000 Received: from p57BD0961.dip0.t-ipconnect.de (EHLO axis700.grange) [87.189.9.97] by mail.gmx.net (mp057) with SMTP; 15 May 2009 19:19:07 +0200 X-Authenticated: #20450766 X-Provags-ID: V01U2FsdGVkX1+AYMQ0pjeAoKUzOAfxEhT7Fx2gAycqBFTNlddTCx PXx0F75an4Y6Bq Received: from lyakh (helo=localhost) by axis700.grange with local-esmtp (Exim 4.63) (envelope-from ) id 1M5144-0002ZG-Q3; Fri, 15 May 2009 19:19:20 +0200 Date: Fri, 15 May 2009 19:19:20 +0200 (CEST) From: Guennadi Liakhovetski To: Linux Media Mailing List cc: Hans Verkuil , Magnus Damm , Robert Jarzmik , Darius Augulis , Paul Mundt Subject: [PATCH 03/10 v2] soc_camera_platform: pass device pointer from soc-camera core on .add_device() In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Y-GMX-Trusted: 0 X-FuHaFi: 0.55 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add a struct device pointer to struct soc_camera_platform_info and let the user (ap325rxa) pass it down to soc_camera_platform.c in its .add_device() method. Signed-off-by: Guennadi Liakhovetski --- Paul, another mixed one, should be quite easy to review though:-) arch/sh/boards/board-ap325rxa.c | 2 ++ include/media/soc_camera_platform.h | 3 +++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c index 0a5f97b..ac964e4 100644 --- a/arch/sh/boards/board-ap325rxa.c +++ b/arch/sh/boards/board-ap325rxa.c @@ -339,6 +339,8 @@ static int ap325rxa_camera_add(struct soc_camera_link *icl, if (icl != &camera_info.link || camera_probe() <= 0) return -ENODEV; + camera_info.dev = dev; + return platform_device_register(&camera_device); } diff --git a/include/media/soc_camera_platform.h b/include/media/soc_camera_platform.h index af224de..3e8f020 100644 --- a/include/media/soc_camera_platform.h +++ b/include/media/soc_camera_platform.h @@ -14,6 +14,8 @@ #include #include +struct device; + struct soc_camera_platform_info { int iface; char *format_name; @@ -21,6 +23,7 @@ struct soc_camera_platform_info { struct v4l2_pix_format format; unsigned long bus_param; void (*power)(int); + struct device *dev; int (*set_capture)(struct soc_camera_platform_info *info, int enable); struct soc_camera_link link; };