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: 10846855 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 AA1D86C2 for ; Mon, 11 Mar 2019 07:55:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 943AD28F5F for ; Mon, 11 Mar 2019 07:55:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 887EA28F69; Mon, 11 Mar 2019 07:55:58 +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 30ED228F5F for ; Mon, 11 Mar 2019 07:55:58 +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=7hg2o7dGOUrLmwjkZw/YXk7kwx1yiFAePZqNeLp/+l4=; b=VGmif/3ye/dQRZ yei3N/BSSfCHvGqtDkMN/WO0Bc6J2G8jUHbMkIRxI3gvRrFpjaAu75N6onArhZEgnFAzcGdSMNYsw lDOtrSyM4vULqBhHLwxpBxrUFdt91a4jvbyi/jl7E5fbLOhn7eUI9d6k5yoDRAp0dmKcP3uTN+FPd Uaz8p8vTziTMh7Or4IDXaucNjmPMUhyDKfWu70pTK17aez40g1KyoAzhXzzvNp3tPO07Dv/i8D1/R tLxHuzmwvZRZ3FmS2/4LWB3HAPXD5BaC0jJ0n+zroQAGrhoHCvWIejtFPd6rPSJM7IYw85xLFn/iY 39sTBT5PfZboxf2qM1jQ==; 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 1h3Fmt-0006qp-Qt; Mon, 11 Mar 2019 07:55:55 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3Fmq-0006po-82 for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2019 07:55:53 +0000 Received: by mail-pg1-x541.google.com with SMTP id r124so3428647pgr.3 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=Rp85x/pcw4p7wAbloFHwP5UQdPXP2Jn0oNevaB8Jk/j1Dr3MeVdIRf6CyHAM8sg8gk rDKQC8MwPpIAFf58Iuce0SyajREh/9vsNYRrXRrcoPYmFzRbYoiYGELtsUR0fUSGOoXL RYB6Y7WN2A2FSprLiNvKNKevbhhmTwSzIab323cysPxVKANuf6V97IGZ1pE5badm2lXJ +wK++ut3Encgx6VosCG7ZVy8FyGAA+zXE5ueFdwy2bZYa3aixPUiJyLK57ROaTMJ3/1e vvZvL/2MNBr3i2LP8Pc8vsE4qTi/9KUCTgM7mg3otd0Ds/FvlB6cnAk4QF92mDHLKyXJ 97Fg== X-Gm-Message-State: APjAAAUN3WBCfgnB3AoEnQJ+QkCFkU8aQfu97FjKIIZEMW8+h4prIpUr 74/87SZYpG0QoKpJE0gdKseqZQ== 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_404727_8CD9DE1B X-CRM114-Status: GOOD ( 12.97 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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; }