From patchwork Wed Jun 4 16:56:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 356036 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 21146140092 for ; Thu, 5 Jun 2014 02:56:13 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751906AbaFDQ4L (ORCPT ); Wed, 4 Jun 2014 12:56:11 -0400 Received: from perceval.ideasonboard.com ([95.142.166.194]:56936 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751354AbaFDQ4I (ORCPT ); Wed, 4 Jun 2014 12:56:08 -0400 Received: from avalon.ideasonboard.com (unknown [91.177.145.25]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8AC3E35A3C; Wed, 4 Jun 2014 18:55:42 +0200 (CEST) From: Laurent Pinchart To: linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-next@vger.kernel.org, wsa@the-dreams.de, khali@linux-fr.org, linus.walleij@linaro.org, paul.gortmaker@windriver.com, jg1.han@samsung.com, laurent.pinchart@ideasonboard.com, Stephen Rothwell , Jim Davis Subject: [PATCH] i2c: pca954x: Fix compilation without CONFIG_GPIOLIB Date: Wed, 4 Jun 2014 18:56:32 +0200 Message-Id: <1401900992-16581-1-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.8.5.5 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org The pca954x driver recently switched to the GPIO descriptor API without including the correct header. This breaks compilation without CONFIG_GPIOLIB. drivers/i2c/muxes/i2c-mux-pca954x.c: In function ‘pca954x_probe’: drivers/i2c/muxes/i2c-mux-pca954x.c:204:2: error: implicit declaration of function ‘devm_gpiod_get’ [-Werror=implicit-function-declaration] gpio = devm_gpiod_get(&client->dev, "reset"); ^ drivers/i2c/muxes/i2c-mux-pca954x.c:204:7: warning: assignment makes pointer from integer without a cast [enabled by default] gpio = devm_gpiod_get(&client->dev, "reset"); ^ drivers/i2c/muxes/i2c-mux-pca954x.c:206:3: error: implicit declaration of function ‘gpiod_direction_output’ [-Werror=implicit-function-declaration] gpiod_direction_output(gpio, 0); ^ cc1: some warnings being treated as errors make[3]: *** [drivers/i2c/muxes/i2c-mux-pca954x.o] Error 1 Fix it by including the right header. Reported-by: Jim Davis Signed-off-by: Laurent Pinchart Acked-by: Jean Delvare Reviewed-by: Jingoo Han --- drivers/i2c/muxes/i2c-mux-pca954x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c index c2c443f..9bd4212 100644 --- a/drivers/i2c/muxes/i2c-mux-pca954x.c +++ b/drivers/i2c/muxes/i2c-mux-pca954x.c @@ -36,12 +36,11 @@ */ #include -#include +#include #include #include #include #include -#include #include #define PCA954X_MAX_NCHANS 8