From patchwork Mon Mar 11 07:55:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pi-Hsun Shih X-Patchwork-Id: 10846857 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E23CD1515 for ; Mon, 11 Mar 2019 07:56:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7C9128F5F for ; Mon, 11 Mar 2019 07:56:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B4F6728F69; Mon, 11 Mar 2019 07:56:07 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 625DB28F5F for ; Mon, 11 Mar 2019 07:56:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=tUsm63lJfRmwMI6B438TiQ9shtgQ8y4BR1wlEwzynaQ=; b=UgiL3HoR0jx/g2 5tfx5dQfkGjjCzILs+a5eU6M8MwJqaU4SW/RL2l372esuBCgMwP3ZiTooruLuOnulPhiMmKmV5xMZ f4MK4eL/revvzi8FsjLFfd69SzEyF2R9Nk7bD+XXggxsEDBDFFzKy3ohxIVgGI32ZH8BREQBVt8DW 5ZC1NK92t7givDeyRG/U7xLe17DJUm+FAv0wHbszv9ApsqrJYfa29u+5IPCurrjIJaTpvGfX3Pt8r Q9bflo4scPIGy+tMS8ue2jmK73az1L7SKtHgkcZDrIoHdZEOsiViaw9ZuIOgsICFTQIsncUMvecnZ rpObsLtm7KYC1ijzojVg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3Fms-0006qR-OI; Mon, 11 Mar 2019 07:55:54 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3Fmq-0006pp-1Y for linux-mediatek@lists.infradead.org; Mon, 11 Mar 2019 07:55:53 +0000 Received: by mail-pg1-x542.google.com with SMTP id v12so429674pgq.1 for ; Mon, 11 Mar 2019 00:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ft2UN5cLlD5VuHU5OgpRG9HuzgvY/xGUcyXH1HE1OW4=; b=oPbZSo/viIJe8sbM72giRyXtRCSg5/jyuo3Kgt6UcDWFCmTlLcQSzeim1B0yGzWluY qt39B2EiL8HZgQFQF+0EjJHHz12LZrMLavOhEW4pThlK8K9HV9L1Pth02YYcvlAzaWgr tEO/Eq82wKrEHXKBSfIR+w/zg4TF+KuQJfZFY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ft2UN5cLlD5VuHU5OgpRG9HuzgvY/xGUcyXH1HE1OW4=; b=TWH61kOAcPbMTmfgwoh1XOACU3BWvO9TrebHPkaN/+LW/Mom72/OcBvHWU9c1/rWVT NMr2JkbYOEhzx4Rtxqar13gSVOIQC9oLWpHeR5aohF/dfPFDjlcYf5TScUo++y0mBNmi nGJjAeGwWPNuUmSGR6Zdgg9SyKoFKAbzxKRQ6YYtJFfyjJTJWgbU2LRIhNpet1lrk7cd QLMo0zmITBfihuoglL2INZsV6WBli+vGXNch9EOyKbbddobl+Mfs0dodN/U+hwT/54bf cSQYUsu4Ag2hxAgXERS6BhSkIR89g7xgByhIGHfLNhiuLUeAHR1OSGKfjDzPvreu4U/x 6BSg== X-Gm-Message-State: APjAAAWHpidhJzFCGZmKSP8puiwiG0I9stfrvLVivnpdyGYiWtORd3M1 HhdAOWOFGP19odLOvwPU9Vd2uQ== X-Google-Smtp-Source: APXvYqxQRedsJtxDZw+mhEF4kaD/iko7UVJ4HMEN7+v9kKKoVQwgNfBFtMb1CeCxxwNzewrDL9B8+g== X-Received: by 2002:a17:902:284b:: with SMTP id e69mr31738471plb.11.1552290951066; Mon, 11 Mar 2019 00:55:51 -0700 (PDT) Received: from pihsun-z840.tpe.corp.google.com ([2401:fa00:1:10:7889:7a43:f899:134c]) by smtp.googlemail.com with ESMTPSA id y7sm6534145pgf.42.2019.03.11.00.55.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Mar 2019 00:55:50 -0700 (PDT) From: Pi-Hsun Shih To: Subject: [PATCH] mfd: mt6397: Don't call irq_dispose_mapping. Date: Mon, 11 Mar 2019 15:55:40 +0800 Message-Id: <20190311075540.26117-1-pihsun@chromium.org> X-Mailer: git-send-email 2.21.0.360.g471c308f928-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190311_005552_087020_E64B505E X-CRM114-Status: GOOD ( 11.51 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:REAL TIME CLOCK RTC SUBSYSTEM" , Alessandro Zummo , Alexandre Belloni , Sean Wang , open list , "moderated list:ARM/Mediatek RTC DRIVER" , Pi-Hsun Shih , Matthias Brugger , Eddie Huang , "moderated list:ARM/Mediatek RTC DRIVER" Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The IRQ mapping was changed to not being created in the rtc-mt6397 driver, so the irq_dispose_mapping is no longer needed. Also the dev_id passed to free_irq should be the same as the last argument passed to request_threaded_irq. This prevents a "Trying to free already-free IRQ 274" warning when unbinding the driver. Fixes: e695d3a0b3b3 ("mfd: mt6397: Create irq mappings in mfd core driver") Signed-off-by: Pi-Hsun Shih --- drivers/rtc/rtc-mt6397.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/rtc/rtc-mt6397.c b/drivers/rtc/rtc-mt6397.c index e9a25ec4d434..c06cf5202e02 100644 --- a/drivers/rtc/rtc-mt6397.c +++ b/drivers/rtc/rtc-mt6397.c @@ -343,7 +343,7 @@ static int mtk_rtc_probe(struct platform_device *pdev) if (ret) { dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n", rtc->irq, ret); - goto out_dispose_irq; + return ret; } device_init_wakeup(&pdev->dev, 1); @@ -359,9 +359,7 @@ static int mtk_rtc_probe(struct platform_device *pdev) return 0; out_free_irq: - free_irq(rtc->irq, rtc->rtc_dev); -out_dispose_irq: - irq_dispose_mapping(rtc->irq); + free_irq(rtc->irq, rtc); return ret; } @@ -369,8 +367,7 @@ static int mtk_rtc_remove(struct platform_device *pdev) { struct mt6397_rtc *rtc = platform_get_drvdata(pdev); - free_irq(rtc->irq, rtc->rtc_dev); - irq_dispose_mapping(rtc->irq); + free_irq(rtc->irq, rtc); return 0; }