From patchwork Wed Jul 18 13:53:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1211141 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id DE096DFFFD for ; Wed, 18 Jul 2012 13:54:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751347Ab2GRNyS (ORCPT ); Wed, 18 Jul 2012 09:54:18 -0400 Received: from perceval.ideasonboard.com ([95.142.166.194]:52874 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754574Ab2GRNyD (ORCPT ); Wed, 18 Jul 2012 09:54:03 -0400 Received: from avalon.ideasonboard.com (unknown [91.178.171.146]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 85FAF35A88; Wed, 18 Jul 2012 15:54:00 +0200 (CEST) From: Laurent Pinchart To: Guennadi Liakhovetski Cc: linux-media@vger.kernel.org Subject: [PATCH v3 2/9] soc-camera: Pass the physical device to the power operation Date: Wed, 18 Jul 2012 15:53:57 +0200 Message-Id: <1342619644-5712-3-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1342619644-5712-1-git-send-email-laurent.pinchart@ideasonboard.com> References: <1342619644-5712-1-git-send-email-laurent.pinchart@ideasonboard.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org There will be no soc_camera_device instance with a soc-camera device is used with a non soc-camera host, so we won't be able to pass the soc_camera_device fake platform device to board code. Pass the physical device instead. The argument is currently not used by any board file so this is safe. Signed-off-by: Laurent Pinchart --- drivers/media/video/soc_camera.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c index e7c6809..b03ffec 100644 --- a/drivers/media/video/soc_camera.c +++ b/drivers/media/video/soc_camera.c @@ -62,7 +62,7 @@ static int soc_camera_power_on(struct soc_camera_device *icd, } if (icl->power) { - ret = icl->power(icd->pdev, 1); + ret = icl->power(icd->control, 1); if (ret < 0) { dev_err(icd->pdev, "Platform failed to power-on the camera.\n"); @@ -78,7 +78,7 @@ static int soc_camera_power_on(struct soc_camera_device *icd, esdpwr: if (icl->power) - icl->power(icd->pdev, 0); + icl->power(icd->control, 0); elinkpwr: regulator_bulk_disable(icl->num_regulators, icl->regulators); @@ -95,7 +95,7 @@ static int soc_camera_power_off(struct soc_camera_device *icd, return ret; if (icl->power) { - ret = icl->power(icd->pdev, 0); + ret = icl->power(icd->control, 0); if (ret < 0) { dev_err(icd->pdev, "Platform failed to power-off the camera.\n");