From patchwork Tue Dec 7 22:29:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Cohen X-Patchwork-Id: 384432 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 oB7MU80k030718 for ; Tue, 7 Dec 2010 22:30:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754171Ab0LGWaF (ORCPT ); Tue, 7 Dec 2010 17:30:05 -0500 Received: from mail-bw0-f45.google.com ([209.85.214.45]:37037 "EHLO mail-bw0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754050Ab0LGWaE (ORCPT ); Tue, 7 Dec 2010 17:30:04 -0500 Received: by bwz16 with SMTP id 16so624338bwz.4 for ; Tue, 07 Dec 2010 14:30:02 -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; bh=OmXARBkPuG2xdyiWr5QQh8gM02KsN0U7nVXYLK/CcI4=; b=gMYBwY3xqhw0AUhXaU9ExG2kEgk1dK7GEpcNGY9cXAKeVk7baFpl6qy0i/VQd7WvW1 LEFgquZTs7j0Dxj2HYTqpR5JLcPZQhUf4LGnOXRkeadycDbzi+/h5fCxbx9jGQyzN256 9I5z55f6K5zFRcDEniYn7Pn9ayU8Sv6ZYiA2Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=wJJ4cVFcunnarHwk0cLC2YY/gcZoG8If7gxgsb6YdDUDWkXt4m4IhCUcuSAOrNqBCn Xpd4mSv5F10p/qMah49l/2oh8e9WvDC7mbNVOB0V69ViE7OIUo2evge1+zsxFS0SxMQ9 /p7gBq27K3YEN7rm82Te0MIXg6rtRkhlYNOOk= Received: by 10.204.68.69 with SMTP id u5mr1196164bki.99.1291761002481; Tue, 07 Dec 2010 14:30:02 -0800 (PST) Received: from localhost.localdomain (a91-152-85-108.elisa-laajakaista.fi [91.152.85.108]) by mx.google.com with ESMTPS id a4sm2616801bka.7.2010.12.07.14.29.59 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 07 Dec 2010 14:30:00 -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 v2] ov9640: fix OmniVision OV9640 sensor driver's I2C remove function Date: Wed, 8 Dec 2010 00:29:34 +0200 Message-Id: <1291760974-11859-1-git-send-email-dacohen@gmail.com> X-Mailer: git-send-email 1.7.1 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]); Tue, 07 Dec 2010 22:30:10 +0000 (UTC) diff --git a/drivers/media/video/ov9640.c b/drivers/media/video/ov9640.c index 99e9e1d..1315696 100644 --- a/drivers/media/video/ov9640.c +++ b/drivers/media/video/ov9640.c @@ -791,7 +791,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 = container_of(sd, struct ov9640_priv, subdev); kfree(priv); return 0;