From patchwork Fri Aug 2 14:09:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 2837945 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 E64099F479 for ; Fri, 2 Aug 2013 14:09:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3A8BA20418 for ; Fri, 2 Aug 2013 14:09:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 06F0C20184 for ; Fri, 2 Aug 2013 14:09:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751127Ab3HBOJE (ORCPT ); Fri, 2 Aug 2013 10:09:04 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:45615 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750962Ab3HBOJC (ORCPT ); Fri, 2 Aug 2013 10:09:02 -0400 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MQW00K1RPZ1U6B0@mailout2.samsung.com> for linux-mmc@vger.kernel.org; Fri, 02 Aug 2013 23:09:01 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.113]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 9C.BD.03969.D7DBBF15; Fri, 02 Aug 2013 23:09:01 +0900 (KST) X-AuditID: cbfee68f-b7f436d000000f81-81-51fbbd7df80f Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 2E.96.32250.C7DBBF15; Fri, 02 Aug 2013 23:09:01 +0900 (KST) Received: from [10.252.81.186] by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MQW00JYVPZ0JK00@mmp2.samsung.com>; Fri, 02 Aug 2013 23:09:00 +0900 (KST) Message-id: <51FBBD7E.2090700@samsung.com> Date: Fri, 02 Aug 2013 23:09:02 +0900 From: Jaehoon Chung User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-version: 1.0 To: "linux-mmc@vger.kernel.org" Cc: 'Chris Ball' , Kyungmin Park , =?ISO-8859-1?Q?Heiko_St=FCbner?= Subject: [PATCH v2 4/4] mmc: sdhci-s3c: remove the duplicated calling sequence Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprEIsWRmVeSWpSXmKPExsWyRsSkULd27+9Ag483uC22v97IZvH/0WtW i7NNb9gtjvzvZ3Rg8Th0ZS2jR9+WVYwe26/NY/b4vEkugCWKyyYlNSezLLVI3y6BK+Nz5372 grV8FR3X+hgbGC9xdzFyckgImEhsetTLCGGLSVy4t56ti5GLQ0hgKaPEreOfGWGK+jZ2MEIk pjNKrNz5GMp5zSix/OJlZpAqXgEtiXMfnrCB2CwCqhIvLj5lBbHZBHQktn87zgRiiwqESSz5 9pgNol5Q4sfkeyxdjBwcIgLWEs2/ZUFmMgs0MUp82TOFHSQuLOAv0X4tEqScGWjM/tZpbBC2 vMTmNW+ZQeolBOaxS6zf8xVqr4DEt8mHwGZKCMhKbDrADPGApMTBFTdYJjCKzEKyeRaSsbOQ jF3AyLyKUTS1ILmgOCm9yFivODG3uDQvXS85P3cTIzA+Tv971r+D8e4B60OMyUArJzJLiSbn A+MrryTe0NjMyMLUxNTYyNzSjDRhJXFetRbrQCGB9MSS1OzU1ILUovii0pzU4kOM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XFScCABKfaciAgMA AA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Didn't need to call the sdhci_s3c_notify_change in setup_card_detect_gpio(). Signed-off-by: Jaehoon Chung Signed-off-by: Kyungmin Park Acked-by: Heiko Stuebner Tested-by: Heiko Stuebner --- Changelog v2: - Added acked/tested by Heiko (on s3c2416) drivers/mmc/host/sdhci-s3c.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index f974778..c4ea802 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -409,20 +409,18 @@ static void sdhci_s3c_setup_card_detect_gpio(struct sdhci_s3c *sc) if (devm_gpio_request(dev, pdata->ext_cd_gpio, "SDHCI EXT CD") == 0) { sc->ext_cd_gpio = pdata->ext_cd_gpio; sc->ext_cd_irq = gpio_to_irq(pdata->ext_cd_gpio); - if (sc->ext_cd_irq && - request_threaded_irq(sc->ext_cd_irq, NULL, - sdhci_s3c_gpio_card_detect_thread, - IRQF_TRIGGER_RISING | - IRQF_TRIGGER_FALLING | - IRQF_ONESHOT, - dev_name(dev), sc) == 0) { - int status = gpio_get_value(sc->ext_cd_gpio); - if (pdata->ext_cd_gpio_invert) - status = !status; - sdhci_s3c_notify_change(sc->pdev, status); - } else { - dev_warn(dev, "cannot request irq for card detect\n"); - sc->ext_cd_irq = 0; + if (sc->ext_cd_irq) { + ret = request_threaded_irq(sc->ext_cd_irq, NULL, + sdhci_s3c_gpio_card_detect_thread, + IRQF_TRIGGER_RISING | + IRQF_TRIGGER_FALLING | + IRQF_ONESHOT, + dev_name(dev), sc); + if (ret) { + dev_warn(dev, + "cannot request irq for card detect\n"); + sc->ext_cd_irq = 0; + } } } else { dev_err(dev, "cannot request gpio for card detect\n");