From patchwork Mon Jun 24 09:22:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2769401 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D200FC0AB1 for ; Mon, 24 Jun 2013 09:22:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A6517200FE for ; Mon, 24 Jun 2013 09:22:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C9777200F6 for ; Mon, 24 Jun 2013 09:22:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751060Ab3FXJWh (ORCPT ); Mon, 24 Jun 2013 05:22:37 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:65181 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750979Ab3FXJWh (ORCPT ); Mon, 24 Jun 2013 05:22:37 -0400 Received: from axis700.grange (dslb-178-001-231-216.pools.arcor-ip.net [178.1.231.216]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0M2kBW-1U26Di00Fa-00sgKt; Mon, 24 Jun 2013 11:22:36 +0200 Received: by axis700.grange (Postfix, from userid 1000) id ACA8540BB4; Mon, 24 Jun 2013 11:22:35 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id AA61A40BB3 for ; Mon, 24 Jun 2013 11:22:35 +0200 (CEST) Date: Mon, 24 Jun 2013 11:22:35 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: Linux Media Mailing List Subject: [PATCH] V4L2: fix compilation if CONFIG_I2C is undefined Message-ID: MIME-Version: 1.0 X-Provags-ID: V02:K0:JANjdfA/cvW+a/nKcfuNkhH96xllL8+0k8grRejP7m+ Q2Mrj+sP60YAWXK6+XmzZeOXkEWKr09G1nwXlZUIDGFlnE57K1 SHuo2IkV6u+5fsSH+EMbTBymTfXneG+95w/kAm/m28l61S5Ws1 J51z+PLWm2m/mtY5KzlksiVF6vlUpePQ/tkoYpeJhqQdxV7fpE +jHebMsF1H5+uF18L4JBO48ySTpLQPlzuObnT2uRNee3qTI42R auGKL6NRnso1aqLa1pGW/gCyrhblRtqUyw/GTRS4etlIj+egz0 zo3zlyi7ClUJbrl08EjXd0BHti8Gb8zRAteaGWIODnX2stYGkw hmriFraRm6afj5cvJSZTFhcXMKkAoiQhi5334QwAILPHwf5yod EJtd+YPlDbxaQ== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP i2c_verify_client() is only available, if I2C is enabled. Fix v4l2-async.c compilation if I2C is disabled. Signed-off-by: Guennadi Liakhovetski --- drivers/media/v4l2-core/v4l2-async.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c index c80ffb4..aae2417 100644 --- a/drivers/media/v4l2-core/v4l2-async.c +++ b/drivers/media/v4l2-core/v4l2-async.c @@ -24,11 +24,15 @@ static bool match_i2c(struct device *dev, struct v4l2_async_subdev *asd) { +#if IS_ENABLED(CONFIG_I2C) struct i2c_client *client = i2c_verify_client(dev); return client && asd->bus_type == V4L2_ASYNC_BUS_I2C && asd->match.i2c.adapter_id == client->adapter->nr && asd->match.i2c.address == client->addr; +#else + return false; +#endif } static bool match_platform(struct device *dev, struct v4l2_async_subdev *asd)