Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp4213700pxb; Sat, 5 Feb 2022 06:53:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQKNcHoDLK5MkMTPJMzU7PT2d0yjl/nA+amJt2nk3cqzuEvZr3HxowMnWRhavvIDyCi8lU X-Received: by 2002:a63:2a46:: with SMTP id q67mr3177997pgq.595.1644072829457; Sat, 05 Feb 2022 06:53:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644072829; cv=none; d=google.com; s=arc-20160816; b=NVtVJvbgElyxMuKv72Hrv2DaSSV2RMkhEOxjQPkn+delKBbK2uPiwu7s5Ui+wsZdGT 7JjExo4L4eDoLgo5A6ZH9ethoEUQnao7CC4Y4Xh20fcJOjaS74KCnfFw1/bOC0qHarHg KXyd7rSA8FrtkdH690IWXlUYLCGhy1T2LZeiTIzaQrYEEOhMklDSXHpD6igZULEgFAPa X61MDi8yt1PfegmCIFTYPMpMYXSM/eSi3ml3Wy7wPGgup4HOJLfZ8f2sWZiWfQ6Ammpd xSRwyASGgW76b+Bp//bVENYkZIJZE9N0KgF6FHnQglv1jBoYHJrPcKKeyzbhT1vhH7kr n+uQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DAIcuwwi2BP4NiFyHqKe0BCgP8mtwzjUa/ZfXGkPZks=; b=sWMrRdwuubh0Y/Omfact62Y6rjnWb0hmHl7ia45qCYu/wZX/ifBd/NJ6q8OOWFwqFT xqFXDC6H26eA+Pa3UoDkiOD9dpulQOOPdnFU7o3EAY9tpn8dd7UgyjbyC5l+toIl8Dmj GNqKKBuiTDoGf9ZEsLpmkHAr3/ewSIQjcpjER78dMJtPa1ZEWCyiI6q0rGVkvnnZOKKT w6r6P5v7u/OqFgxUN+UX3LpFuHHMXGSA8RIHnOClVRilc4044k2rEqYAyDn/f0aH92qc JuFl2q+E5+fbZBN1JozgGxoaSLB1DLwkObhPaGfga3FC+15odXT6NmR11ds5fb4KAySh K+3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GOMfXIy6; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q6si4757981pgp.405.2022.02.05.06.53.36; Sat, 05 Feb 2022 06:53:49 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GOMfXIy6; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346504AbiBBSHH (ORCPT + 99 others); Wed, 2 Feb 2022 13:07:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230512AbiBBSHD (ORCPT ); Wed, 2 Feb 2022 13:07:03 -0500 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4241CC061714; Wed, 2 Feb 2022 10:07:03 -0800 (PST) Received: by mail-ej1-x630.google.com with SMTP id jx6so249774ejb.0; Wed, 02 Feb 2022 10:07:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DAIcuwwi2BP4NiFyHqKe0BCgP8mtwzjUa/ZfXGkPZks=; b=GOMfXIy6GygS0cMun5y2V4/XiJph+7Lvpo1R7S60UziS3zp3BmAGhWPdW6ZLs2Vly7 nb9b0ERNumAQEbrKKCVwZXd4PdGpmJJkPw+z/QmzTgklWLU3FtdMaHkQeFSLZlY79nmt NthTUFUQM7YS9Dt1UhqNsnYSsZ4CJrJu5REHsKB1LugbyQ+r7FVtww/eVJvKsD/bE583 d8KvEHhislw3WdAx6KBholYbaGHcrSfCkBEONVjQCsP5duEbidt+vOQqsQ9pJw0EVpIy AVM25riavAnLOWFIB8FAafNXQTpBAUAupLu9f/jIxYv8DICIwwsjxsRv9ZpKMF7t/L6K ob0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DAIcuwwi2BP4NiFyHqKe0BCgP8mtwzjUa/ZfXGkPZks=; b=xJ7bfI2jusJvqIevL/8dyAbMmgA6Uxh8OFEl57Kne+wi+lHofcEjmeQOUZEm21kw8P 4IQWAjlbHJxZi94xWIaPzPvNmgR5oSfixGoTBlDPMlSM80Bls70mr1D/DVWPtuZpQ/sI QP6mevR/gxobE2hvL3B/n689cxi+engM2E7vLEMqVb8/xR0yMDM3oAo2J9itTnt15aHp HgXzm5GGN7ifOdm5R2aZyEJ7wf3fD4/UavaAYuKnYueH8IBbsuQyBWM7bfaMpIb1LVEJ QMqP4tPnNP5e9NIy4FkTC9yVSyTtUXeE7580R7+dqWof+N5+YuXwi9M7efdX5+JtKGpv NBjA== X-Gm-Message-State: AOAM533bSn3R+NnFUZvuiSnsb2DT/T5QD+a3/C9tdy+prZ+6VJ34fN6+ d4k/5AqZbwH1W/j4W4PnX0c= X-Received: by 2002:a17:907:7286:: with SMTP id dt6mr26104656ejc.285.1643825221869; Wed, 02 Feb 2022 10:07:01 -0800 (PST) Received: from localhost.localdomain (p4fd5939b.dip0.t-ipconnect.de. [79.213.147.155]) by smtp.gmail.com with ESMTPSA id ee37sm3223005edb.106.2022.02.02.10.07.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Feb 2022 10:07:01 -0800 (PST) From: Bean Huo To: ulf.hansson@linaro.org, eugen.hristev@microchip.com, adrian.hunter@intel.com, nicolas.ferre@microchip.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: beanhuo@micron.com Subject: [PATCH 3/5] mmc: sdhci-omap: Use of_device_get_match_data() helper Date: Wed, 2 Feb 2022 19:06:46 +0100 Message-Id: <20220202180648.1252154-4-huobean@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220202180648.1252154-1-huobean@gmail.com> References: <20220202180648.1252154-1-huobean@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bean Huo Only the device data is needed, not the entire struct of_device_id. Use of_device_get_match_data() instead of open coding of_match_device(). Signed-off-by: Bean Huo --- drivers/mmc/host/sdhci-omap.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c index 64e27c2821f9..676e3cbbfc95 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -1219,16 +1219,11 @@ static int sdhci_omap_probe(struct platform_device *pdev) struct sdhci_pltfm_host *pltfm_host; struct sdhci_omap_host *omap_host; struct mmc_host *mmc; - const struct of_device_id *match; struct sdhci_omap_data *data; const struct soc_device_attribute *soc; struct resource *regs; - match = of_match_device(omap_sdhci_match, dev); - if (!match) - return -EINVAL; - - data = (struct sdhci_omap_data *)match->data; + data = of_device_get_match_data(&pdev->dev); if (!data) { dev_err(dev, "no sdhci omap data\n"); return -EINVAL; -- 2.25.1