From patchwork Wed Jul 14 13:21:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Dietrich X-Patchwork-Id: 111975 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6EDNFTW002827 for ; Wed, 14 Jul 2010 13:23:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757117Ab0GNNVw (ORCPT ); Wed, 14 Jul 2010 09:21:52 -0400 Received: from faui40.informatik.uni-erlangen.de ([131.188.34.40]:45272 "EHLO faui40.informatik.uni-erlangen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757103Ab0GNNVu (ORCPT ); Wed, 14 Jul 2010 09:21:50 -0400 Received: from faui49q (faui49q.informatik.uni-erlangen.de [131.188.42.68]) by faui40.informatik.uni-erlangen.de (Postfix) with SMTP id 22ADD5F0DF; Wed, 14 Jul 2010 15:21:48 +0200 (MEST) Received: by faui49q (sSMTP sendmail emulation); Wed, 14 Jul 2010 15:21:48 +0200 Date: Wed, 14 Jul 2010 15:21:48 +0200 From: Christian Dietrich To: Jonathan Corbet , Mauro Carvalho Chehab , Tejun Heo , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: vamos-dev@i4.informatik.uni-erlangen.de Subject: [PATCH 4/4] drivers/media/video: Remove dead CONFIG_OLPC_X0_1 Message-ID: <966ac7deeee8b102b9b8d829ca14e177f9368f21.1279111369.git.qy03fugy@stud.informatik.uni-erlangen.de> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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 (demeter.kernel.org [140.211.167.41]); Wed, 14 Jul 2010 13:23:16 +0000 (UTC) diff --git a/drivers/media/video/ov7670.c b/drivers/media/video/ov7670.c index 91c886a..309b272 100644 --- a/drivers/media/video/ov7670.c +++ b/drivers/media/video/ov7670.c @@ -409,42 +409,6 @@ static struct regval_list ov7670_fmt_raw[] = { /* * Low-level register I/O. - * - * Note that there are two versions of these. On the XO 1, the - * i2c controller only does SMBUS, so that's what we use. The - * ov7670 is not really an SMBUS device, though, so the communication - * is not always entirely reliable. - */ -#ifdef CONFIG_OLPC_XO_1 -static int ov7670_read(struct v4l2_subdev *sd, unsigned char reg, - unsigned char *value) -{ - struct i2c_client *client = v4l2_get_subdevdata(sd); - int ret; - - ret = i2c_smbus_read_byte_data(client, reg); - if (ret >= 0) { - *value = (unsigned char)ret; - ret = 0; - } - return ret; -} - - -static int ov7670_write(struct v4l2_subdev *sd, unsigned char reg, - unsigned char value) -{ - struct i2c_client *client = v4l2_get_subdevdata(sd); - int ret = i2c_smbus_write_byte_data(client, reg, value); - - if (reg == REG_COM7 && (value & COM7_RESET)) - msleep(5); /* Wait for reset to run */ - return ret; -} - -#else /* ! CONFIG_OLPC_XO_1 */ -/* - * On most platforms, we'd rather do straight i2c I/O. */ static int ov7670_read(struct v4l2_subdev *sd, unsigned char reg, unsigned char *value) @@ -498,7 +462,6 @@ static int ov7670_write(struct v4l2_subdev *sd, unsigned char reg, msleep(5); /* Wait for reset to run */ return ret; } -#endif /* CONFIG_OLPC_XO_1 */ /*