Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4148356pxb; Tue, 17 Nov 2020 12:35:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJy7WhlgwFlquS02Qlzs+Fd0UbSPuBAa8wamEWXzoR0pgHeGEGJsWmrogLRwc3WtF/ooioMN X-Received: by 2002:a50:de45:: with SMTP id a5mr22242952edl.91.1605645357134; Tue, 17 Nov 2020 12:35:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605645357; cv=none; d=google.com; s=arc-20160816; b=H5F6amPzuvo/6sNsvv3xphlIZadTQnvtQMB1z7Gx0ARzp3awjedQJYsC7N5tdKszS2 zpLQuQp8/oEtnYdAGo3jR7BabYAhxsxWbqKbPTlaHqkWzR0mScoExIQv4Fn+lpgcZCUk iZ+XAd4KZ09ud4ckXJ801HgkTjTMHel4jbH2w3nI7RxFJM4b0tIBKGbLay6LfZapwFFn 3+Db6tv9Vw48sXsUmKiE+BugbFseCl5Xeoxl/KUSNB6r4GpUz3Zl0jWh/zQAM/bmxb05 YVdZR8ie7Bnx6GW00sWIg2QI0sr4ehodyCmINxDz41pYjr/A6ieMUNrjatHCp9ASkEVT FLVQ== 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; bh=bp0rj4uZyT+H7Gmn3GWBASXcuLexNuDeqirdObSbpFM=; b=QJ/fhy05A472zYdOWoUHxl3bODWxvqryA33ZvuRS/k3AJvrl/Hs7x85zvOx/3HGquq 4NkRcuRBA/QFz4W+1XGFAW/tL6U46lauog4LJ6GBBuwRVFl1rKrqv5QExkvmLOSuhTh8 n9Oac/gAlwTDPKyVe0DLt0APayU5z0U7i3HSSLxpJTtlHI0ZW1b6gFLBuGvfgTdr7cVa U40u0t4ECMOqn8qsvCPEJ2WR79qBLMuKsxeXn5BYm+TTavWAhr/DqU9LLKOV9aqUEV8r 0Mra/b+FhScSbhDE+DAapPjp1nFENP0NEEMX1U0OTcSOB8i6Ns4/uZXGyeRkQ5W6KJdK 1nkA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f9si15072853edy.248.2020.11.17.12.35.33; Tue, 17 Nov 2020 12:35:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726509AbgKQUaz (ORCPT + 99 others); Tue, 17 Nov 2020 15:30:55 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:52377 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725943AbgKQUar (ORCPT ); Tue, 17 Nov 2020 15:30:47 -0500 Received: from localhost (lfbn-lyo-1-997-19.w86-194.abo.wanadoo.fr [86.194.74.19]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 4C663240005; Tue, 17 Nov 2020 20:30:45 +0000 (UTC) From: Alexandre Belloni To: Alessandro Zummo , Alexandre Belloni Cc: Fabio Estevam , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] rtc: mxc: use of_device_get_match_data Date: Tue, 17 Nov 2020 21:30:35 +0100 Message-Id: <20201117203035.1280099-1-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use of_device_get_match_data to simplify mxc_rtc_probe. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-mxc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c index 018bfa952d66..0d253ce3a8f5 100644 --- a/drivers/rtc/rtc-mxc.c +++ b/drivers/rtc/rtc-mxc.c @@ -307,14 +307,12 @@ static int mxc_rtc_probe(struct platform_device *pdev) u32 reg; unsigned long rate; int ret; - const struct of_device_id *of_id; pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) return -ENOMEM; - of_id = of_match_device(imx_rtc_dt_ids, &pdev->dev); - pdata->devtype = (enum imx_rtc_type)of_id->data; + pdata->devtype = (enum imx_rtc_type)of_device_get_match_data(&pdev->dev); pdata->ioaddr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(pdata->ioaddr)) -- 2.28.0