From patchwork Mon May 11 16:37:41 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 1009 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Mon, 11 May 2009 16:37:05 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra.chehab.org with IMAP (fetchmail-6.3.6) for (single-drop); Mon, 11 May 2009 15:06:17 -0300 (BRT) Received: from vger.kernel.org ([209.132.176.167]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1M3YUz-0005fN-GM; Mon, 11 May 2009 16:37:05 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753350AbZEKQhA (ORCPT + 1 other); Mon, 11 May 2009 12:37:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753878AbZEKQhA (ORCPT ); Mon, 11 May 2009 12:37:00 -0400 Received: from acsinet11.oracle.com ([141.146.126.233]:48959 "EHLO acsinet11.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752733AbZEKQg7 (ORCPT ); Mon, 11 May 2009 12:36:59 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by acsinet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n4BGa51s003251 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 11 May 2009 16:36:09 GMT Received: from abhmt005.oracle.com (abhmt005.oracle.com [141.146.116.14]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n4BGa9Vg010368; Mon, 11 May 2009 16:36:09 GMT Received: from [192.168.1.4] (/71.182.83.218) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 11 May 2009 09:35:41 -0700 Message-ID: <4A085455.5040108@oracle.com> Date: Mon, 11 May 2009 09:37:41 -0700 From: Randy Dunlap Organization: Oracle Linux Engineering User-Agent: Thunderbird 2.0.0.6 (X11/20070801) MIME-Version: 1.0 To: Stephen Rothwell CC: linux-next@vger.kernel.org, LKML , linux-media@vger.kernel.org, Mauro Carvalho Chehab Subject: [PATCH -next] v4l2: handle unregister for non-I2C builds References: <20090511161442.3e9d9cb9.sfr@canb.auug.org.au> In-Reply-To: <20090511161442.3e9d9cb9.sfr@canb.auug.org.au> X-Source-IP: abhmt005.oracle.com [141.146.116.14] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010205.4A0853DE.029A:SCFSTAT5015188,ss=1,fgs=0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Randy Dunlap Build fails when CONFIG_I2C=n, so handle that case in the if block: drivers/built-in.o: In function `v4l2_device_unregister': (.text+0x157821): undefined reference to `i2c_unregister_device' Signed-off-by: Randy Dunlap --- drivers/media/video/v4l2-device.c | 2 ++ 1 file changed, 2 insertions(+) --- linux-next-20090511.orig/drivers/media/video/v4l2-device.c +++ linux-next-20090511/drivers/media/video/v4l2-device.c @@ -85,6 +85,7 @@ void v4l2_device_unregister(struct v4l2_ /* Unregister subdevs */ list_for_each_entry_safe(sd, next, &v4l2_dev->subdevs, list) { v4l2_device_unregister_subdev(sd); +#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) if (sd->flags & V4L2_SUBDEV_FL_IS_I2C) { struct i2c_client *client = v4l2_get_subdevdata(sd); @@ -95,6 +96,7 @@ void v4l2_device_unregister(struct v4l2_ if (client) i2c_unregister_device(client); } +#endif } } EXPORT_SYMBOL_GPL(v4l2_device_unregister);