Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1900108rwb; Thu, 17 Nov 2022 03:52:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf7+GUj6U7Un8do3nH6JwghP/FP6yzedhg/71F+rUT2vr7Q7Z9uUt2LrE2XbhdmhtNk+01sQ X-Received: by 2002:a17:90a:d315:b0:218:6d44:53ec with SMTP id p21-20020a17090ad31500b002186d4453ecmr2496328pju.154.1668685950285; Thu, 17 Nov 2022 03:52:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668685950; cv=none; d=google.com; s=arc-20160816; b=fqIPgmf/2heV4l4gOH34/jAEklEH767V9bHmd/mjmnK/ma/L4qxvHuRZfl89RKj6Li NWQy8UbZWKp6sgimWF08PxeyuYNpwg7VCRelzzGM2CmrDUP/y2DQBRl5ImYs1/eqgX4s TWwKfn4Wlxua/1hsYWjmRNHEh7/Mrpa30febRxXgUOT0378EQNR/uFi+CTcf5F4WYyjr 6geHMRQ01bpV+yngJDafGn4EUiV0DmTwiSGnefP97L4TmOsSl42NkQtPL1QrZ4VdR7Un fUvUHV5oqbjxH8Fj29WErRE0RuJ2rphbD0hFsOCfb1ij7dP3V0nNDkEml6KH6zEONZKD JgIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=NDug6hxyj4CHutN5FixT2fyk+saDDI0UsEFHgECVXT4=; b=bSNgq9VkO8t+ofre4Czg027cv1LI7JNOjuooqN68K8GWZFBqfgku3ZrLNfDig0g74F fwTst/npJyxL20tQip8WO0ChrdJfkKNyoCkItCCQQTmhuEBTAmW0Q5WZFIXTaQHSEeYD cFUV2FzSs6fxYdRU3THNJVA//xjNK0QlDz0VPoeu/KQ25lBGph21sGYvZJf3qjMyasGt riOd5xBW27jEIa/rJgFf/eBb41mnaWymvaxhsE/wHgRyzecWavEg4GIaGFwKnWuA4lLx wSi93LP+mUnJe4qOYgvqhhploF3Xgd15d58/NwSYkKEqF6YUZ8VGhTZ+sC7KRoMMas6f 2ffQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p2-20020a170902e74200b0018731d9aabbsi812522plf.497.2022.11.17.03.52.18; Thu, 17 Nov 2022 03:52:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239913AbiKQLka (ORCPT + 92 others); Thu, 17 Nov 2022 06:40:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239932AbiKQLkD (ORCPT ); Thu, 17 Nov 2022 06:40:03 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D8685C74F for ; Thu, 17 Nov 2022 03:39:40 -0800 (PST) Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4NCdHZ5ThZz8RTZK; Thu, 17 Nov 2022 19:39:38 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl1.zte.com.cn with SMTP id 2AHBdTsH020311; Thu, 17 Nov 2022 19:39:29 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Thu, 17 Nov 2022 19:39:32 +0800 (CST) Date: Thu, 17 Nov 2022 19:39:32 +0800 (CST) X-Zmail-TransId: 2af963761d74ffffffff8983c8e3 X-Mailer: Zmail v1.0 Message-ID: <202211171939327684154@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , Subject: =?UTF-8?B?W1BBVENIIGxpbnV4LW5leHRdIG1lbW9yeTogdGktZW1pZi1wbTogVXNlIGRldmljZV9nZXRfbWF0Y2hfZGF0YSgpIHRvIHNpbXBsaWZ5CgogdGhlIGNvZGU=?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl1.zte.com.cn 2AHBdTsH020311 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.137.novalocal with ID 63761D7A.001 by FangMail milter! X-FangMail-Envelope: 1668685178/4NCdHZ5ThZz8RTZK/63761D7A.001/10.5.228.132/[10.5.228.132]/mse-fl1.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63761D7A.001/4NCdHZ5ThZz8RTZK X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: ye xingchen Directly get the match data with device_get_match_data(). Signed-off-by: ye xingchen --- drivers/memory/ti-emif-pm.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/memory/ti-emif-pm.c b/drivers/memory/ti-emif-pm.c index 31d6266f008c..cef0d3beb63b 100644 --- a/drivers/memory/ti-emif-pm.c +++ b/drivers/memory/ti-emif-pm.c @@ -277,18 +277,13 @@ static int ti_emif_probe(struct platform_device *pdev) int ret; struct resource *res; struct device *dev = &pdev->dev; - const struct of_device_id *match; struct ti_emif_data *emif_data; emif_data = devm_kzalloc(dev, sizeof(*emif_data), GFP_KERNEL); if (!emif_data) return -ENOMEM; - match = of_match_device(ti_emif_of_match, &pdev->dev); - if (!match) - return -ENODEV; - - emif_data->pm_data.ti_emif_sram_config = (unsigned long)match->data; + emif_data->pm_data.ti_emif_sram_config = (unsigned long) device_get_match_data(&pdev->dev); emif_data->pm_data.ti_emif_base_addr_virt = devm_platform_get_and_ioremap_resource(pdev, 0, -- 2.25.1