Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp685735pxb; Tue, 5 Apr 2022 18:45:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzd44Vd/bUz+U0enXDZolLB7zmd119l9PTEOaBgttN9lNZQKnjbWXhXOFAnYkJ35ooFkDxg X-Received: by 2002:a17:907:1ca4:b0:6da:86a4:1ec7 with SMTP id nb36-20020a1709071ca400b006da86a41ec7mr6224333ejc.556.1649209384318; Tue, 05 Apr 2022 18:43:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649209384; cv=none; d=google.com; s=arc-20160816; b=Y2WlrZ7isOz5fuchAp25QZjz7eBeX8nnKynUKg7o2BuslU3hWNt78ACojpV71IHwYm V9QcYfl1zSCyg9MbvI0waxfs/uYQZdT8Y9Oy7u+40lVYazU1OMk6++BZ7+NN8FO56dwA Tut7BYPSFxwp6wcqNymPF8Nm+gP+Ov7063AW0ND44a2Dqwfrp5jQR+h8mcK2tsuorIkJ B/0UNxAl8IcryhTDaraF+WM6E4Os7xVxUsGvA3bK3WQCPlFeoZJgz/yeMTlvv+vW6uEy vXY1/k0h1T75E1NG3oHTANpSOJBKVqcLJ30KNjLQFVoCa8oZhewWTXjnEdkQS6ffoUmV yi9w== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gEv4X1wmLz3v3GSER4sj31FZMTFef6+KkcHIAgP4PxA=; b=veOwAdTYJ70GA7imM9TwwBC9T4wFU5ZItzDs4oJR2MsrTNYbeDhVI6axlcekus9hBb Mfi94Vtky6woYPvb6Z+Ywq2W45eIS8QEXPkR7UYjLuLlRfjmuHDjbTRdWRdhuzcC6aj4 AhR6DqlLr18gzsyS5tmRU0AUSGvFFnHNzhwHGx/DaaXE6Z61OqTlJzbtLqmWVs1x5rx0 loUYh2znIw7wDbyDRYkC4mLlDETxv7Cimlagcdbam1H3TVGQMm/djpTY6pEUaH9Uim9Y PwOvOdgSN9IpptejLXvp04jHgTy8jSvOQyjhfZiRLALih66xhpbbBna24RKwSIBMxWoO jPrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="akzIaV/2"; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t1-20020a170906064100b006e0649233c3si10254296ejb.854.2022.04.05.18.42.34; Tue, 05 Apr 2022 18:43:04 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b="akzIaV/2"; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387913AbiDENUA (ORCPT + 99 others); Tue, 5 Apr 2022 09:20:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344284AbiDEJTE (ORCPT ); Tue, 5 Apr 2022 05:19:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B5D122BE9; Tue, 5 Apr 2022 02:07:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 08B3A614E4; Tue, 5 Apr 2022 09:07:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F187C385A0; Tue, 5 Apr 2022 09:07:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149627; bh=cCkzTuHVbIYO3xWJxG7pG5NEV84ox2pqEC8ctSG62fk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=akzIaV/2OH9eRtRzcUgcQj82PzacPGO7KNR2wvqyHOchAkWKvEujI5Kpk1oJ/bRoA p2XReKw/43Nb4lLZoGRRXQaBsG8NO4Dp50OjUEGrFxrEI51amgnR/V7S5u2zCiZv4G Mhj2y4JUURu/91fp8PkUBjF7sAW51PnbqsLQynd8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zeal Robot , Minghao Chi , Mark Brown , Sasha Levin Subject: [PATCH 5.16 0782/1017] spi: tegra20: Use of_device_get_match_data() Date: Tue, 5 Apr 2022 09:28:15 +0200 Message-Id: <20220405070417.468449376@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: Minghao Chi [ Upstream commit c9839acfcbe20ce43d363c2a9d0772472d9921c0 ] Use of_device_get_match_data() to simplify the code. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Link: https://lore.kernel.org/r/20220315023138.2118293-1-chi.minghao@zte.com.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-tegra20-slink.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c index e8204e155484..746bbafa1378 100644 --- a/drivers/spi/spi-tegra20-slink.c +++ b/drivers/spi/spi-tegra20-slink.c @@ -1003,14 +1003,8 @@ static int tegra_slink_probe(struct platform_device *pdev) struct resource *r; int ret, spi_irq; const struct tegra_slink_chip_data *cdata = NULL; - const struct of_device_id *match; - match = of_match_device(tegra_slink_of_match, &pdev->dev); - if (!match) { - dev_err(&pdev->dev, "Error: No device match found\n"); - return -ENODEV; - } - cdata = match->data; + cdata = of_device_get_match_data(&pdev->dev); master = spi_alloc_master(&pdev->dev, sizeof(*tspi)); if (!master) { -- 2.34.1