Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2020048pxb; Wed, 2 Feb 2022 19:04:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJwlAgvZj2vSQA4iXjz3WC5xjb0HD2S5v2DIHGCdCf9li6fLaKrSzfrTNzY9+VEmge915KIP X-Received: by 2002:a63:4755:: with SMTP id w21mr27204470pgk.336.1643857452887; Wed, 02 Feb 2022 19:04:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643857452; cv=none; d=google.com; s=arc-20160816; b=PoX9LdOPY47evTgEv3rYYRapXzPfc/W5qI3fnS+ytkIgFJdPNmgzxTTTtG+d+0uqkZ rWlbLlanrs+w36HTq/jnQTcJMO/N8AxjyEAcl1qjr1hlLzZE4MNqo6bLMH6879LJ6rNl 3OZHbnqgME7kA7lGO9EwHEZVenjCj+iJPqtu1EF/5VmHuIJxhoWLQjgiAMBJTz2y6YnQ cbNwROAhK2Abq9+m4gGraMcheaMocN346GZG4JF8kBH7pCElhEXXiT+OD+LlOxIBExqd zb9GDjHz441blt/6IqfW9jojYwSrJtEy9f5iQTsT10XbXVwSWwmkyud2QEdVxKsiXU/2 RFfw== 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=ip+D+4jKDZ9eZzccWWkC2tZZAMJIHmVnZ4DotqyL+9Q=; b=BXNJCssUb2CxaDzIlPudcpvHEsDxcakbCg2tnM9o/BnNL7E4eBFyHGPpDUXCCJOWk+ al+9g/6skQye2PonkwkD1M+GDejlovJ8+zNg/2epCsuhPhgjRowFo05FC4tAiEyDZmgk 82lufDjRrUM8NnjyLcI9FNdIE6kEbJK/1TiPjgJTxnUt9Yy7e1/Xp8gi/R9wrxGDACQy J+WBYhDZvzi++ORhDnLD+YLX63RpLpZjcQewhhBomoyBwTIjb01132VdtjVqkPgBI1Rb rweN2nY7IEGszuO8drPaiOUUr31upRg3CHEIK2h+uu2kfsWYh/xxn9yQZOE5zst2ueu3 X+ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=WvZavXM5; 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 b67si16664461pga.458.2022.02.02.19.04.00; Wed, 02 Feb 2022 19:04:12 -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=WvZavXM5; 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 S229680AbiBBSHF (ORCPT + 99 others); Wed, 2 Feb 2022 13:07:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242208AbiBBSHD (ORCPT ); Wed, 2 Feb 2022 13:07:03 -0500 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80A33C061714; Wed, 2 Feb 2022 10:07:02 -0800 (PST) Received: by mail-ej1-x633.google.com with SMTP id ah7so147719ejc.4; Wed, 02 Feb 2022 10:07:02 -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=ip+D+4jKDZ9eZzccWWkC2tZZAMJIHmVnZ4DotqyL+9Q=; b=WvZavXM5BasA5y4AJ64ENlaYbO06iiyfkI2ndwUeanWSXSaI/IHkkZ/0SXLKZgi4Zc bvRw5BReLIZohLrhhXCE4RnC48twGved0UieEha5mY3rwMV8b5lw3yp48SzGMcl+eCL+ NS9AQFdOZK8oqlNHmX4+GyyfdY0+uvDgMZPZmGZ+ifk5SjDhPrELZUmpJVXQVlCDrnYl oe3GsurbvcjvJ6CP1C+iFRnjTQx2jFWgW6NBMzuF30mNBF6w3PvlNlqCtujotjkEFY+/ MxI/GkJv5nxGVPfsNKQIVoOraFynObswwfKu/kql6detF7KoK4NsNSI7IK9AYEtBeWKB /erQ== 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=ip+D+4jKDZ9eZzccWWkC2tZZAMJIHmVnZ4DotqyL+9Q=; b=8LXtSuYmehVofxe9nMe4F+xH+tEtsxHQAjQQeHBhPzR0I5BK6Zyeuc934D4WoQT82F CmC50NvRyYCtxRzMHr+U9HfJfQL5+KF8NtNMOZOeRR38kCc+vKMjCDHdKLPrxwcaG14A u2Z5CAPYwRqi0JaaMquojy+F4xN+wGsnysAVUFFJCj1KEkkp1qrADiCMUpN+Gh8lnPI1 AfpNs0EmrJ0ivYuIfkiewmIZ+yjpKbdIK9sjyK+0qcODacyY/Az5WdBqw17/pV36KuKK P9Q7Mhqzn4qhHqJ78gstmrS++U9asP/FhTVCrkkhDkz6r2H61qx4fNXOQTMnRnufNFAD s0sg== X-Gm-Message-State: AOAM532uX18Ka1XEXH5oFJtj1A4vYakpy4x+bR1Ke87GATlW8+0pGbOl Kv97SHTg/chhF9ItOWHwfaw= X-Received: by 2002:a17:907:6d17:: with SMTP id sa23mr26004476ejc.164.1643825221082; 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.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Feb 2022 10:07:00 -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 2/5] mmc: sdhci-tegra: Use of_device_get_match_data() helper Date: Wed, 2 Feb 2022 19:06:45 +0100 Message-Id: <20220202180648.1252154-3-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 whole struct of_device_id. Use of_device_get_match_data() instead of open coding of of_match_device(). Signed-off-by: Bean Huo --- drivers/mmc/host/sdhci-tegra.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 35ebba067e87..0c9f778ea860 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -1618,7 +1618,6 @@ static int sdhci_tegra_add_host(struct sdhci_host *host) static int sdhci_tegra_probe(struct platform_device *pdev) { - const struct of_device_id *match; const struct sdhci_tegra_soc_data *soc_data; struct sdhci_host *host; struct sdhci_pltfm_host *pltfm_host; @@ -1626,10 +1625,9 @@ static int sdhci_tegra_probe(struct platform_device *pdev) struct clk *clk; int rc; - match = of_match_device(sdhci_tegra_dt_match, &pdev->dev); - if (!match) + soc_data = of_device_get_match_data(&pdev->dev); + if (!soc_data) return -EINVAL; - soc_data = match->data; host = sdhci_pltfm_init(pdev, soc_data->pdata, sizeof(*tegra_host)); if (IS_ERR(host)) -- 2.25.1