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: 36078 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oi0-f72.google.com (mail-oi0-f72.google.com [209.85.218.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7CA08203C5 for ; Wed, 27 Aug 2014 11:01:17 +0000 (UTC) Received: by mail-oi0-f72.google.com with SMTP id a141sf120182oig.11 for ; Wed, 27 Aug 2014 04:01:17 -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=7q/SjkrMHAKdxv+hUqNZ3WJDxvPuUfzoqX+st+3TLIY=; b=mO4Zzk3G2rctdZMH27G+Zqh304wgYyjYJJpapkxWNyfiiFCKZn1Ns9Fm1fOeLots1t IXYzTeDnx9fcLcjSq4X4Bdz5XiYsadBrQABrGRJl+n39pcCL4rmGks9Tdb6rljl15+pr LDBPd8f8j7M8zMQYKqlLDyVEPLq6PVjq/3HQdzHLL968ZpykEQPkaugXmmaKexo42XM3 G/qsTRT/Ms3hxKciyW/IJOddqRCCXdz9SswlUodCQqyLAI+opU0MR3cfCrbL3I5yRP9e 4Dk9jY+c9FXZt0WnpbfNNzV016WIy1cBKdwGGWdJiwoscuzudZ4GZFbLlmEmkrP8TKTC ma6A== X-Gm-Message-State: ALoCoQnmalmDKSibGg/0gVPi7BU5IX2Sumx5zGLOe5cuJfGqBVeeFrcuYLj7xPqNncI7gMEFoLdj X-Received: by 10.42.62.73 with SMTP id x9mr25569824ich.15.1409137277061; Wed, 27 Aug 2014 04:01:17 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.51.51 with SMTP id t48ls62819qga.67.gmail; Wed, 27 Aug 2014 04:01:16 -0700 (PDT) X-Received: by 10.236.151.231 with SMTP id b67mr48143299yhk.24.1409137276958; Wed, 27 Aug 2014 04:01:16 -0700 (PDT) Received: from mail-yh0-f51.google.com (mail-yh0-f51.google.com [209.85.213.51]) by mx.google.com with ESMTPS id u26si4791656yhf.138.2014.08.27.04.01.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Aug 2014 04:01:16 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.213.51 as permitted sender) client-ip=209.85.213.51; Received: by mail-yh0-f51.google.com with SMTP id f73so36517yha.10 for ; Wed, 27 Aug 2014 04:01:16 -0700 (PDT) X-Received: by 10.221.21.201 with SMTP id qt9mr499741vcb.39.1409137276868; Wed, 27 Aug 2014 04:01:16 -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.45.67 with SMTP id uj3csp62804vcb; Wed, 27 Aug 2014 04:01:16 -0700 (PDT) X-Received: by 10.68.201.167 with SMTP id kb7mr45468757pbc.38.1409137275834; Wed, 27 Aug 2014 04:01:15 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tl8si8341026pac.234.2014.08.27.04.01.04 for ; Wed, 27 Aug 2014 04:01:04 -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 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-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: 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.213.51 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. 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)