From patchwork Wed Dec 8 12:13:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Cohen X-Patchwork-Id: 390582 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB8CEJdi019195 for ; Wed, 8 Dec 2010 12:14:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754823Ab0LHMOR (ORCPT ); Wed, 8 Dec 2010 07:14:17 -0500 Received: from mail-ey0-f171.google.com ([209.85.215.171]:64617 "EHLO mail-ey0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754816Ab0LHMOQ (ORCPT ); Wed, 8 Dec 2010 07:14:16 -0500 Received: by mail-ey0-f171.google.com with SMTP id 5so792625eyg.2 for ; Wed, 08 Dec 2010 04:14:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=EEvZbNoRF93oz+4lof5e61dC9W4z0A1XqKcZqdTPnNk=; b=BYDaUjOWe56ejczK6EU7YL5XAdmCkVjJVd3yaKUTg3RkzB0sOWrhHc1uudbopyfQ/u UiWluzfb7Xmw+2/1a8mypeFp91HOoD4CL1DFFM78JdIpMDWL8+NU2z24SYox3YqpX9MF LfVyGB13nzGkPVhdjzfCyjadqu/SVDJaP7bA4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=INlyLMNuudagAh5mG0Deq/3giQPqFRo3AvtrJBP7jL6yckKebmbT8eCxCLupoVg0x1 dCw/JEGBYVQac5oUtEEgAyAq8HijJRFGAEDr8zGOFUioZepDH3vLd3oYfX7pP0dX3sdf Wlo/7d+6/JnUb6qvbpye1M+SzHImHhdm0cg2Y= Received: by 10.213.4.137 with SMTP id 9mr1133149ebr.56.1291810455434; Wed, 08 Dec 2010 04:14:15 -0800 (PST) Received: from localhost.localdomain (a91-152-85-108.elisa-laajakaista.fi [91.152.85.108]) by mx.google.com with ESMTPS id b52sm376776eei.13.2010.12.08.04.14.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 08 Dec 2010 04:14:14 -0800 (PST) From: David Cohen To: mchehab@redhat.com Cc: linux-media@vger.kernel.org, marek.vasut@gmail.com, g.liakhovetski@gmx.de, David Cohen Subject: [PATCH v3 2/2] ov9640: fix OmniVision OV9640 sensor driver's priv data retrieving Date: Wed, 8 Dec 2010 14:13:59 +0200 Message-Id: <1291810439-7026-3-git-send-email-dacohen@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1291810439-7026-1-git-send-email-dacohen@gmail.com> References: <1291810439-7026-1-git-send-email-dacohen@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 08 Dec 2010 12:14:19 +0000 (UTC) diff --git a/drivers/media/video/ov9640.c b/drivers/media/video/ov9640.c index c6d8e8a..53d88a2 100644 --- a/drivers/media/video/ov9640.c +++ b/drivers/media/video/ov9640.c @@ -651,7 +651,8 @@ static int ov9640_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a) static int ov9640_video_probe(struct soc_camera_device *icd, struct i2c_client *client) { - struct ov9640_priv *priv = i2c_get_clientdata(client); + struct v4l2_subdev *sd = i2c_get_clientdata(client); + struct ov9640_priv *priv = to_ov9640_sensor(sd); u8 pid, ver, midh, midl; const char *devname; int ret = 0; @@ -788,7 +789,8 @@ static int ov9640_probe(struct i2c_client *client, static int ov9640_remove(struct i2c_client *client) { - struct ov9640_priv *priv = i2c_get_clientdata(client); + struct v4l2_subdev *sd = i2c_get_clientdata(client); + struct ov9640_priv *priv = to_ov9640_sensor(sd); kfree(priv); return 0;