From patchwork Wed Aug 27 11:00:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 383420 X-Patchwork-Delegate: linus.walleij@linaro.org 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 BA1C21400A3 for ; Wed, 27 Aug 2014 21:01:04 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755708AbaH0LBD (ORCPT ); Wed, 27 Aug 2014 07:01:03 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:40232 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755126AbaH0LBC (ORCPT ); Wed, 27 Aug 2014 07:01:02 -0400 Received: by mail-wi0-f182.google.com with SMTP id d1so229833wiv.9 for ; Wed, 27 Aug 2014 04:01:00 -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=mtL3OdP1qf0IxVn307xsFfAJ4ND+mr0XYsA1jEXRANE=; b=EwdkO6JfYQzNbPG21fKpiSN3+VyE8CsnPl0zbTifEF8r7lo21WTX/r+F7pHYKHEQk5 B7bZdjeee1nL48hW4B1zNIHFW3f2jrS0Xqgil1LYBrLbD8MO+M7hdyHpq7FKDqgXBKuo fMbexvh+ttrN7MkZTP3Ze0CoxJOXjDRyrIknvyp56Y+o3fUUme36yhBEayNSHPy/18r/ P3TULIIQVVdNP++43CluU3gWyYBbhzJmcZ/+yfU+i3LcagI+LSwmy5L4XrdvmsEHe0v3 nj+bULTC6jilZ+kbH3oIMDWn5oCXOQ5SS50KKUOPR/RGhic8Iqjxa3Lu+v1Qt8ZJmO3b urAg== X-Gm-Message-State: ALoCoQnTZhlcNLZr5i88nbvtR+lYF5IXd68eXDeWlVoB1tIzKCXbDEVPlq05UG/WZsLHcj8tX3z9 X-Received: by 10.180.198.232 with SMTP id jf8mr26902132wic.37.1409137260631; Wed, 27 Aug 2014 04:01:00 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id y5sm93002wje.32.2014.08.27.04.00.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Aug 2014 04:00:59 -0700 (PDT) From: Linus Walleij To: linux-mmc@vger.kernel.org, Chris Ball , Ulf Hansson Cc: linux-gpio@vger.kernel.org, Linus Walleij Subject: [PATCH 1/4] mmc: slot-gpio: switch to use flags when getting GPIO Date: Wed, 27 Aug 2014 13:00:50 +0200 Message-Id: <1409137253-25189-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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. Reviewed-by: Alexandre Courbot Signed-off-by: Linus Walleij --- 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)