Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2143297rdb; Mon, 9 Oct 2023 14:15:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHrXhmjkZJoHdRI9e2iTUbVOm1P3kMpF194TBFgbFCtFPJn4ZF3eiPHZra0VNKYZTCl3wpT X-Received: by 2002:a17:902:bb84:b0:1c7:4334:6540 with SMTP id m4-20020a170902bb8400b001c743346540mr12068682pls.63.1696886158688; Mon, 09 Oct 2023 14:15:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696886158; cv=none; d=google.com; s=arc-20160816; b=suP4XwebbsETptxXyG+YJFux/3O/v6LORry3jgsd9Js52NaaqaR05rjCe9T1T+s9sh j0Zufu4heShSIh8H6rcX4r30ZAvugLw9jcZI2TijABAcEq2JcOQP+6UeJU29IvTZ0ix5 hpCTm0WtCXct6XkPgyqhRFrYyKRCKMrPwHgB6FAbYMcnbn4qufWxJIs64T/SET7GZNoz WwBPLSNb1VTRtlbmFKN8rH2Ly9t/Bwgs9PaHAcqihV+6uA9/cGkU3I3YpFR/ImvtNrmz jZkyBz1NESyHETq10qRTlpoDBOOeHAR0q+HGR2G6ZfLrQB0I6YOAyFa5YdbLyBCQL64q 5EaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=3WliIXsI9LZtAegv+wjwMhsUnaU2MvLThXAl1Bbjv1M=; fh=v0oNvEXQj7r21zk3J/KDh4IIbBA8av8WWGxXK1Gm4K4=; b=QjU8YVCP7y2We47fMnWjYA/upyqkEM5njCydNi0BiINd1Hh+Alee8/H4G5oKYqTk5S C8W0uxxDkkCynAX1HJPlJdfXwGffEyyWO6+yOAKfA4M7bxiXIZ3XHvOE2fzvX43ZLo2d Oeu/JkJLwSd1oL8EtP9GIhZ7C2uoVU8BBjmhEwnOyRgLdBnsJ6RHKgyUQtpGARSUg462 Lk3FuEJx3/RLKtOAGDPXkVZVQZ+fDenebvjteimIDNK0x/TOxKxpbSoUuG3JvPpkpDxP iyk/vwWrezVxHniqJ/1KgvaNMF+EXHCh1/2UBr96LQDm2VYZFQn+IebxHtjoocnQ9vc1 t2KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cmUnYPp2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id ks16-20020a170903085000b001bb809b68a8si9295909plb.229.2023.10.09.14.15.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 14:15:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cmUnYPp2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 1E0608059371; Mon, 9 Oct 2023 14:15:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378639AbjJIVPl (ORCPT + 99 others); Mon, 9 Oct 2023 17:15:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378744AbjJIVPD (ORCPT ); Mon, 9 Oct 2023 17:15:03 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC396122; Mon, 9 Oct 2023 14:14:37 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB0E3C433CD; Mon, 9 Oct 2023 21:14:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696886076; bh=z/UnX911lj51aORILWacOnidg8CfRyf0fi+7bLxaO0E=; h=From:To:Cc:Subject:Date:From; b=cmUnYPp2hj3oIs7P7Q0Antpfe/5PAWFHShloQENlBKJtrpElqzlN/KBzByMmunaAc bB3WyYbXRaHB/hDxr9XzV+taBoD2Ff0heWdzPRk2CtdcaG82L8TLcb/mnX/6XsbrOa 2cyhgDmFeC/3InMwussYnnaZAnEHu7GG8Eg7lS3OCHaCto+P3k13dddY2rTeZgti0t jdcxiRjWEKrTQEvIYjK/E/DLO6gcPdHonLPAn1M9pI0BvQHOh2aKArE1gWF7cwF4Up kqCtopYbiFkylOW7hlMQpgynQf7AS0dBIDrptKz3suBPsCNvSFDEZsZ5o/Yzxt2LcM h8G1l8NAOgHLQ== Received: (nullmailer pid 3246607 invoked by uid 1000); Mon, 09 Oct 2023 21:14:16 -0000 From: Rob Herring To: Patrice Chotard , Wim Van Sebroeck , Guenter Roeck Cc: linux-arm-kernel@lists.infradead.org, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] watchdog: st_lpc: Use device_get_match_data() Date: Mon, 9 Oct 2023 16:13:48 -0500 Message-ID: <20231009211356.3242037-18-robh@kernel.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 09 Oct 2023 14:15:56 -0700 (PDT) X-Spam-Level: ** Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring --- drivers/watchdog/st_lpc_wdt.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/watchdog/st_lpc_wdt.c b/drivers/watchdog/st_lpc_wdt.c index d2aa43c00221..4c5b8d98a4f3 100644 --- a/drivers/watchdog/st_lpc_wdt.c +++ b/drivers/watchdog/st_lpc_wdt.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -42,7 +41,7 @@ struct st_wdog { void __iomem *base; struct device *dev; struct regmap *regmap; - struct st_wdog_syscfg *syscfg; + const struct st_wdog_syscfg *syscfg; struct clk *clk; unsigned long clkrate; bool warm_reset; @@ -150,7 +149,6 @@ static void st_clk_disable_unprepare(void *data) static int st_wdog_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - const struct of_device_id *match; struct device_node *np = dev->of_node; struct st_wdog *st_wdog; struct regmap *regmap; @@ -173,12 +171,7 @@ static int st_wdog_probe(struct platform_device *pdev) if (!st_wdog) return -ENOMEM; - match = of_match_device(st_wdog_match, dev); - if (!match) { - dev_err(dev, "Couldn't match device\n"); - return -ENODEV; - } - st_wdog->syscfg = (struct st_wdog_syscfg *)match->data; + st_wdog->syscfg = (struct st_wdog_syscfg *)device_get_match_data(dev); base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) -- 2.42.0