From patchwork Mon Jan 2 12:05:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 9493407 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4581A62AB4 for ; Mon, 2 Jan 2017 12:05:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3321220008 for ; Mon, 2 Jan 2017 12:05:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 23DF826861; Mon, 2 Jan 2017 12:05:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A5A320008 for ; Mon, 2 Jan 2017 12:05:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755433AbdABMF3 (ORCPT ); Mon, 2 Jan 2017 07:05:29 -0500 Received: from mga03.intel.com ([134.134.136.65]:47240 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751279AbdABMF2 (ORCPT ); Mon, 2 Jan 2017 07:05:28 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 02 Jan 2017 04:05:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,432,1477983600"; d="scan'208";a="1106916956" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 02 Jan 2017 04:05:26 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id AE16CBB; Mon, 2 Jan 2017 14:05:25 +0200 (EET) From: Andy Shevchenko To: Ulf Hansson , linux-mmc@vger.kernel.org, Adrian Hunter Cc: Andy Shevchenko Subject: [PATCH v1 2/2] mmc: slot-gpio: Don't override con_id when request descriptor Date: Mon, 2 Jan 2017 14:05:25 +0200 Message-Id: <20170102120525.178212-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170102120525.178212-1-andriy.shevchenko@linux.intel.com> References: <20170102120525.178212-1-andriy.shevchenko@linux.intel.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The caller may supply connection ID, index, or both. All combinations are possible and mmc framework should not make any assumption on what exactly caller wants. Remove con_id override conditionals in mmc_gpiod_request_ro() and mmc_gpiod_request_cd(). Acked-by: Adrian Hunter Signed-off-by: Andy Shevchenko --- drivers/mmc/core/slot-gpio.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/mmc/core/slot-gpio.c b/drivers/mmc/core/slot-gpio.c index babe591aea96..a8450a8701e4 100644 --- a/drivers/mmc/core/slot-gpio.c +++ b/drivers/mmc/core/slot-gpio.c @@ -235,9 +235,6 @@ int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id, struct gpio_desc *desc; int ret; - if (!con_id) - con_id = ctx->cd_label; - desc = devm_gpiod_get_index(host->parent, con_id, idx, GPIOD_IN); if (IS_ERR(desc)) return PTR_ERR(desc); @@ -289,9 +286,6 @@ int mmc_gpiod_request_ro(struct mmc_host *host, const char *con_id, struct gpio_desc *desc; int ret; - if (!con_id) - con_id = ctx->ro_label; - desc = devm_gpiod_get_index(host->parent, con_id, idx, GPIOD_IN); if (IS_ERR(desc)) return PTR_ERR(desc);