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: 4714301 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id ED8D99F3EC for ; Tue, 12 Aug 2014 17:26:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3B0072018B for ; Tue, 12 Aug 2014 17:26:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 63E2F20172 for ; Tue, 12 Aug 2014 17:26:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753916AbaHLR00 (ORCPT ); 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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=VpDn9Ed4YkaJYvQE6+uhM0mgJfkFGgTRx7pM8jv/+MQ=; b=NBi0sVsyJWJ4ErdlLVgROMRzDq07tbFUU2Cjbf2K2fU/PlMfpXE4XI60SR5P39Fngh N8tLnx9jhmE75FN2nYvIQOjOopbihn6WG/zYD+MXCLm4sM5YyTw6AtMb6VwyAybl52p9 4ZAX+TD0P8oNgic8gV9dUZFZdpNCxrM+2ue29IbqozI8PeMM9QeYkB5sqRbjY1pHqJcO CieD0OtXnItyDqWzlJHUq0nOJtJAJqgN75zfY5TtC+ioZqux8cX0+80JXvvMpN5fwKjW ro/Nb5i/ieWH1fYCjWQ/mBWN2Ci+e7Js5m4RGilCrhUHr9K7cMiI70H0X9o0Tt2/ajDB unOQ== X-Gm-Message-State: ALoCoQl3JFyF1sUdPTAsp9lqpXjC5OrTaOdHEE/+Vc/ixIcM+waNYXukIbpPMXEWSszHafRPJJtt 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: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, 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 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)