From patchwork Tue Aug 19 17:03:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 35645 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 208762034C for ; Tue, 19 Aug 2014 17:06:10 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id v10sf51570570pde.2 for ; Tue, 19 Aug 2014 10:06:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=beJYCn1gUskiIB2WVgU+UONBtTNf/EiJUPGGOUPm/18=; b=IlgTq1dZNZFoDvoTuhdLx4SZBbMZVZyQQ4gh+FZahj41KSEzToyh1hNXt/9/QBUh1H Rp7lAQ5ygevQk3Z1JLgy4Ygn9umofXDOScCCFj7AtYtPksQ+C9T0o/l6vuScdQdgxaDU 2TR+k/yuxH/+nSelwdv55aHyGP7g34+/P9TBnR4kMHFNx2hTDsgZal+xWFE9mrWYC7Em Ck7o7emafzFQiprcpmnjawKx5J7iBB+ChHlVtks4c2sklV/WIxvoFoZ0NupZOoPKncnQ RPWF2RUclGrFc5VtSWShAVRKlpCQSmXcNV1sAU6Mi5MKPJj3LdsMkTSE9l2QUAEXcgP3 vJKg== X-Gm-Message-State: ALoCoQmu3pz9TNtS2LJ0kxD4kIGqBWFk1KlV75BEUYRfoEVgcoN3xhd4LgAWDAYxvd/0SvC2bUp8 X-Received: by 10.66.222.9 with SMTP id qi9mr22757235pac.28.1408467962249; Tue, 19 Aug 2014 10:06:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.41.11 with SMTP id y11ls2899788qgy.23.gmail; Tue, 19 Aug 2014 10:06:02 -0700 (PDT) X-Received: by 10.52.73.202 with SMTP id n10mr625449vdv.86.1408467962074; Tue, 19 Aug 2014 10:06:02 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id fw4si9152881vdc.92.2014.08.19.10.06.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Aug 2014 10:06:01 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf12so7872250vcb.1 for ; Tue, 19 Aug 2014 10:06:01 -0700 (PDT) X-Received: by 10.52.3.40 with SMTP id 8mr6387054vdz.24.1408467961836; Tue, 19 Aug 2014 10:06:01 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp255751vcb; Tue, 19 Aug 2014 10:05:52 -0700 (PDT) X-Received: by 10.68.233.68 with SMTP id tu4mr45848327pbc.65.1408467952015; Tue, 19 Aug 2014 10:05:52 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t7si27770892pdr.201.2014.08.19.10.05.44 for ; Tue, 19 Aug 2014 10:05:44 -0700 (PDT) Received-SPF: none (google.com: linux-gpio-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753208AbaHSRDy (ORCPT ); Tue, 19 Aug 2014 13:03:54 -0400 Received: from mail-ig0-f179.google.com ([209.85.213.179]:61999 "EHLO mail-ig0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752586AbaHSRDy (ORCPT ); Tue, 19 Aug 2014 13:03:54 -0400 Received: by mail-ig0-f179.google.com with SMTP id h18so9958066igc.0 for ; Tue, 19 Aug 2014 10:03:53 -0700 (PDT) X-Received: by 10.50.152.9 with SMTP id uu9mr7146829igb.32.1408467833657; Tue, 19 Aug 2014 10:03:53 -0700 (PDT) Received: from localhost.localdomain ([216.80.66.57]) by mx.google.com with ESMTPSA id jf10sm207209igb.2.2014.08.19.10.03.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Aug 2014 10:03:53 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Alexandre Courbot , Linus Walleij , Alexandre Courbot Subject: [PATCH] gpio: move GPIOD flags outside #ifdef Date: Tue, 19 Aug 2014 12:03:40 -0500 Message-Id: <1408467820-4766-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 Sender: linux-gpio-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-gpio@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The GPIOD flags are defined inside the #ifdef CONFIG_GPIOLIB switch, making the gpiolib stubs fail if these flags are used by a consumer. This is not correct: the stubs should compile fine without GPIOLIB. Cc: Alexandre Courbot Reported-by: Ulf Hansson Signed-off-by: Linus Walleij Reviewed-by: Alexandre Courbot --- include/linux/gpio/consumer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h index b7ce0c64c6f3..c7e17de732f3 100644 --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h @@ -16,8 +16,6 @@ struct device; */ struct gpio_desc; -#ifdef CONFIG_GPIOLIB - #define GPIOD_FLAGS_BIT_DIR_SET BIT(0) #define GPIOD_FLAGS_BIT_DIR_OUT BIT(1) #define GPIOD_FLAGS_BIT_DIR_VAL BIT(2) @@ -34,6 +32,8 @@ enum gpiod_flags { GPIOD_FLAGS_BIT_DIR_VAL, }; +#ifdef CONFIG_GPIOLIB + /* Acquire and dispose GPIOs */ struct gpio_desc *__must_check __gpiod_get(struct device *dev, const char *con_id,