From patchwork Wed Dec 8 09:55:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 12695309 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 48051C433EF for ; Wed, 8 Dec 2021 09:57:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Mime-Version: Message-Id:Date: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=m1HQ5JSBXq92AKBD24KGRL9kMQo6c4FJY9RBSEkcQ+w=; b=acw zgC0TXabLDCHAfWhFsztkdwwh5ih0revtxkv7IvJhRTUp0RKlYAiE8AoIrVhtpDXdNWRvM2W4qnvo /f4vpyfwCh4WaqnmB3pbET0KmRGdE1CTXjuCm1BRTncWpPcLcyB0YmaTDQM+5Pfud175ryagJcPCU 2oelo0Nk9mPXD433x/i56Id5Q1dvNyMytUdfDh8PzVHzGCAShqOO4G4TxH4aCkp5Ug7ekaGyp4SQZ 7kbPqH0pJ1ZsjMGMuU9lBcvIiGufGrm+arTIxaMdWkVE49eJdU1VuKnIANO8MaK9arI+aWH06pf1D db0QepSBH3bNzCJJeMXVu5L/L4Hzs2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mutgL-00C0fJ-Ss; Wed, 08 Dec 2021 09:56:14 +0000 Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mutgI-00C0dt-5I for linux-arm-kernel@lists.infradead.org; Wed, 08 Dec 2021 09:56:11 +0000 Received: by mail-yb1-xb49.google.com with SMTP id g36-20020a25ae64000000b005c1f46f7ee6so3682390ybe.8 for ; Wed, 08 Dec 2021 01:56:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=VEUso1iUERxMrhDAGJGVXME2Ba4vBEfYFLFN/9mCKOc=; b=bs2suS3oNU/TKeJh0arlrk0SgYqcFtn1C+mdVQnTI8h509F58G7tqpdxbLwaSZ9Tbt sEH2s1rzzgjruiRRuiCJUJ08FOq8261V2ew9SKWwlxOfA0UPBIQTCh5ewDkMzlTMxUN8 fweOd+jiB/4uqL/v/3RgxuZ1UiL5B3H68bbFFhDc0HoMBAvW+eKMy3mJbYoNGnK3orOP wPMdlT3lA7JvjbBMYUZfS5vApOVJO7bDUa4Ts5ZCS/8m49kVmXtbwc8R4iOxPJtdhZuI jC8b++71n6LmHVrxRpo7KDXNgOqs4DLZ78CenE0vPOnpellV21wZVbgcjB/t+YFon3FK QHfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=VEUso1iUERxMrhDAGJGVXME2Ba4vBEfYFLFN/9mCKOc=; b=vXdhIa6c0l8i6YUE3PQuXpHpD52sd3VmjvlJNpeyIOMlqr44cAj4D1Siuinv9Ofuyl Ts3+D+c3PTpH0o/ZZBJX3tvuXCHD1ffzdO0hapvqbViD3WNI+RysHYFDg/pGpqH6pagI UPrVhwg5M1ER/ugpDNDzaE0JWpF6nzMqKbK5Z5v48y2vlmJqwKcKBpW+VHN/ut9cbca7 wkDZXQW2GSsfTBE9fEJasKeMVHbGjBDmegMvsSF7fi4LOMOV7I5BVvae4JhQl+A0KTNE VQbxEbkY0qNb/11LzR80JwOZlZm6pFEfmJ+ZEzfYVl73HRmCZvbB/q9kdsVJAKlqhp/H 4Lxg== X-Gm-Message-State: AOAM530XdezhW6hmAnWj6ZKNrfQ0Vx39KLsmvtF0tIR7HT3F1nLK/QGZ gSIIDYLlb544DOTwbKKUeRC6C8wIyM/m X-Google-Smtp-Source: ABdhPJyn5dZSZVoFoykeFQu48j08P80ghWTxCrEKFgd83B9L5HQ4wLohelQrfF7Jl0G85kr0JXoTKG+lgAX6 X-Received: from tzungbi-z840.tpe.corp.google.com ([2401:fa00:1:10:63d3:57e9:34c:bf63]) (user=tzungbi job=sendgmr) by 2002:a25:3154:: with SMTP id x81mr57516600ybx.16.1638957368406; Wed, 08 Dec 2021 01:56:08 -0800 (PST) Date: Wed, 8 Dec 2021 17:55:55 +0800 Message-Id: <20211208095555.4099551-1-tzungbi@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.34.1.173.g76aa8bc2d0-goog Subject: [PATCH] watchdog: mtk_wdt: use platform_get_irq_optional From: Tzung-Bi Shih To: wim@linux-watchdog.org, linux@roeck-us.net, matthias.bgg@gmail.com Cc: linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, wangqing@vivo.com, tzungbi@google.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211208_015610_244191_5F200126 X-CRM114-Status: GOOD ( 11.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The watchdog pre-timeout (bark) interrupt is optional. Use platform_get_irq_optional() to avoid seeing such following error message: >>> mtk-wdt 10007000.watchdog: IRQ index 0 not found Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck --- The patch bases on linux-next next-20211208. drivers/watchdog/mtk_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c index 543cf38bd04e..4577a76dd464 100644 --- a/drivers/watchdog/mtk_wdt.c +++ b/drivers/watchdog/mtk_wdt.c @@ -339,7 +339,7 @@ static int mtk_wdt_probe(struct platform_device *pdev) if (IS_ERR(mtk_wdt->wdt_base)) return PTR_ERR(mtk_wdt->wdt_base); - irq = platform_get_irq(pdev, 0); + irq = platform_get_irq_optional(pdev, 0); if (irq > 0) { err = devm_request_irq(&pdev->dev, irq, mtk_wdt_isr, 0, "wdt_bark", &mtk_wdt->wdt_dev);