From patchwork Tue Aug 12 17:25:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 35302 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f199.google.com (mail-vc0-f199.google.com [209.85.220.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0D6A921137 for ; Tue, 12 Aug 2014 17:26:30 +0000 (UTC) Received: by mail-vc0-f199.google.com with SMTP id la4sf29363954vcb.2 for ; Tue, 12 Aug 2014 10:26:29 -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=6+nFrYE/zw1J5R1ui+moHF+/fnfCMvG9wllIYq/Ai5w=; b=fMOYXMXzEIUSH/LWCJCtzCmgoWsX4woD8fi4k8Vl3kQfVKy8LKzdMZjNMedpIri488 jBnuyU5dzgZV1wu67E9B7Ot/zjxYj15TKkG3rED7GBOya3p+8nIp0/OCJrQIMgBkIOkh Bm50iE9frFMqKdX129O07PdQ6hmEgdA9nf37w2KDWmGcKdTYEjnWxOC84vP/iDiemoUh 0fhV3U+0D/t8efrq9CIz+rnukjgOFgdfuV5rOPi2l4kMhh5cfMsZ7fru80FNm8mNGZOF AMzPF/xilkixb8oHK1mzeGBuq9SosXnUukvLY/2PhsLUl0fn+nRmc0Fxi6pFMYnBkQFz 05Cg== X-Gm-Message-State: ALoCoQkhn9lvr2CNjYMXp8dNabH/XXGbpY5G6Ox8nKsMmCKc1LuMmbee7PBQR92k6DAmjwR7VyIH X-Received: by 10.236.60.129 with SMTP id u1mr115149yhc.57.1407864389850; Tue, 12 Aug 2014 10:26:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.93.228 with SMTP id d91ls287864qge.41.gmail; Tue, 12 Aug 2014 10:26:29 -0700 (PDT) X-Received: by 10.220.163.130 with SMTP id a2mr2304144vcy.52.1407864389725; Tue, 12 Aug 2014 10:26:29 -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 py4si8619619vcb.49.2014.08.12.10.26.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 10:26:29 -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 lf12so13620108vcb.15 for ; Tue, 12 Aug 2014 10:26:29 -0700 (PDT) X-Received: by 10.220.15.8 with SMTP id i8mr2649902vca.45.1407864389600; Tue, 12 Aug 2014 10:26:29 -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 tc5csp266492vcb; Tue, 12 Aug 2014 10:26:29 -0700 (PDT) X-Received: by 10.68.232.34 with SMTP id tl2mr5439136pbc.81.1407864388189; Tue, 12 Aug 2014 10:26:28 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b8si12944921pdm.29.2014.08.12.10.26.27 for ; Tue, 12 Aug 2014 10:26:28 -0700 (PDT) Received-SPF: none (google.com: linux-mmc-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 S1753916AbaHLR00 (ORCPT + 4 others); Tue, 12 Aug 2014 13:26:26 -0400 Received: from mail-we0-f175.google.com ([74.125.82.175]:57156 "EHLO mail-we0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752780AbaHLR0P (ORCPT ); Tue, 12 Aug 2014 13:26:15 -0400 Received: by mail-we0-f175.google.com with SMTP id t60so10314543wes.20 for ; Tue, 12 Aug 2014 10:26:13 -0700 (PDT) X-Received: by 10.194.236.35 with SMTP id ur3mr5707099wjc.127.1407864373686; Tue, 12 Aug 2014 10:26:13 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id cx5sm10649644wjb.8.2014.08.12.10.26.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Aug 2014 10:26:12 -0700 (PDT) From: Linus Walleij To: linux-mmc@vger.kernel.org, Chris Ball , Ulf Hansson Cc: linux-gpio@vger.kernel.org, Linus Walleij , Alexandre Courbot Subject: [PATCH 1/4] mmc: slot-gpio: switch to use flags when getting GPIO Date: Tue, 12 Aug 2014 19:25:52 +0200 Message-Id: <1407864355-21545-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 Sender: linux-mmc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-mmc@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: , When the slot GPIO driver gets the GPIO to be used for card detect, it is now possible to specify a flag to have the line set up as input. Get rid of the explicit setup call for input and use the flag. The extra argument works as there are transition varargs macros in place in the header, in the future we will make the flags argument compulsory. Cc: Alexandre Courbot Signed-off-by: Linus Walleij Reviewed-by: Alexandre Courbot --- drivers/mmc/core/slot-gpio.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/mmc/core/slot-gpio.c b/drivers/mmc/core/slot-gpio.c index 5f89cb83d5f0..908c2b29e79f 100644 --- a/drivers/mmc/core/slot-gpio.c +++ b/drivers/mmc/core/slot-gpio.c @@ -308,14 +308,10 @@ int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id, if (!con_id) con_id = ctx->cd_label; - desc = devm_gpiod_get_index(host->parent, con_id, idx); + desc = devm_gpiod_get_index(host->parent, con_id, idx, GPIOD_IN); if (IS_ERR(desc)) return PTR_ERR(desc); - ret = gpiod_direction_input(desc); - if (ret < 0) - return ret; - if (debounce) { ret = gpiod_set_debounce(desc, debounce); if (ret < 0)