Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4736249yba; Wed, 10 Apr 2019 03:58:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPYj+q/IuAkYMccZyuqZgJkN17CvXmnnPdkD9dyiThZY6cf1NFLbGFLJ/EzqTB89S64n4U X-Received: by 2002:aa7:914d:: with SMTP id 13mr42840902pfi.149.1554893939190; Wed, 10 Apr 2019 03:58:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554893939; cv=none; d=google.com; s=arc-20160816; b=pXRaD/JSPG0d3dx8egVM24gqTDzBWQc3TewTZykZNdfVzArToOrZl6COfIZS5+2fPy Uhou2W4sosSEH5bxkAtgJSX8Ex7BOBqTKUrBFmlMS+wHzv2nmHSbhf9SZ3MzYvKl+YdP LMtJiyCovex6h3ccc780FKo/cvdL/522TFbt4uspTnMxnxdkimVp3VwVKcpI5AHSsk9S x6l7TYEhA8QJVLr2yKFdJpzaifU73UCs3Bj2+JpNTysTcwOH2bAKubgekWvjubYw0pYU +gLTGKUsxy7wZ6dgWI8jOwyK+Wb281WOOXX626OGuV5eKrUfQ6WBPxsuiPZAuzNLkAh8 +chQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=v23tBPREsllbnPTAVdbTeJpnJlYXR8aK3zH/fx7aq6Y=; b=AAP9lFGZjDCDsFXLtnzfK3xvxHjAN0L1Tn7LgQ1/baAz0M/AyzzdNK8U0wSVO+y/br Va8sQCvankfTzbxO9yDM/0T6Bpj1s/mMOwTtn/iopzOJ07GZd/6mpLY0PRKz3o9Py4z2 RyOvWO7eRCoPfgcZqZm1W9uFTW0Knj3UkfmMS6H7g4uoAdYhlaHIg//V9SxDblln6tZ/ P/sRGQCr471y9q+VFm3gRsCVJsiQcZVvu6Rupztp9io2AiJKz+q9WFCFpCoZ8f0nBYzi pmCr9QqAwYTe0VDsqF10AkAgBnVq8twqLnkEufcsbG73AG0soJGMWktLmUT9a9KiKuhl XLYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 19si30159013pgl.402.2019.04.10.03.58.43; Wed, 10 Apr 2019 03:58:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729613AbfDJIr0 (ORCPT + 99 others); Wed, 10 Apr 2019 04:47:26 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:58230 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727184AbfDJIr0 (ORCPT ); Wed, 10 Apr 2019 04:47:26 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 5F3DE242FB7AEE5EBCD9; Wed, 10 Apr 2019 16:47:24 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.408.0; Wed, 10 Apr 2019 16:47:17 +0800 From: Yue Haibing To: , , , , , , , , CC: , , YueHaibing Subject: [PATCH] iio: adc: ti-ads7950: Fix build error without CONFIG_GPIOLIB Date: Wed, 10 Apr 2019 16:45:58 +0800 Message-ID: <20190410084558.35160-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: YueHaibing When building with CONFIG_GPIOLIB is not set gcc warns this: drivers/iio/adc/ti-ads7950.c:75:19: error: field chip has incomplete type struct gpio_chip chip; ^~~~ drivers/iio/adc/ti-ads7950.c: In function ti_ads7950_set: drivers/iio/adc/ti-ads7950.c:409:32: error: implicit declaration of function gpiochip_get_data; did you mean acpi_get_data? [-Werror=implicit-function-declaration] struct ti_ads7950_state *st = gpiochip_get_data(chip); ^~~~~~~~~~~~~~~~~ acpi_get_data Reported-by: Hulk Robot Fixes: c97dce792dc8 ("iio: adc: ti-ads7950: add GPIO support") Signed-off-by: YueHaibing --- drivers/iio/adc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig index 846c7ac..f760269 100644 --- a/drivers/iio/adc/Kconfig +++ b/drivers/iio/adc/Kconfig @@ -968,7 +968,7 @@ config TI_ADS1015 config TI_ADS7950 tristate "Texas Instruments ADS7950 ADC driver" - depends on SPI + depends on SPI && GPIOLIB select IIO_BUFFER select IIO_TRIGGERED_BUFFER help -- 2.7.4