Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp675985pxb; Tue, 5 Apr 2022 18:19:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRogSElcJxZgc5raLuG4TmIT5JbGzSNT3fLtTspTK/63zk4A7Krtoemaf55PdcddKPXJwb X-Received: by 2002:a05:6402:42c6:b0:41c:defd:24d1 with SMTP id i6-20020a05640242c600b0041cdefd24d1mr6436796edc.326.1649207952095; Tue, 05 Apr 2022 18:19:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649207952; cv=none; d=google.com; s=arc-20160816; b=BxWaYsIbYRPTvUOnk1ldd7ATMhJ4+Srysgo0xXuu7URuhyNRLtrGpt/nwCrJWroOwf nuatXWU4Yn+bxMXpPBsbBNVD/klL/DZF/03XF5aNYltHr+682hqH8ZcK1gDlNjpcwdk+ qQATJ+2azr8jArE86VTYK8/u5HVSsrP/N6dKmUwJtKdmJtzvi70LLVjYyIoRp8BdY4w3 +R6CkB9sPLLJYoxgH9PHpDMI2nJtGu3WCjF2H+jL+Qxek3qwTFeaKo7QBTe0wJ6n7+So teJmkPjk/GudLyzC1y/tLT99gzuuYyPQda0KUxKiCr8RYLRnuy0OnE+wlEI5o1F/XbZd aMtA== 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=KLU5m473K3VcK+riJqqBOhF9LQhZPPI9SGmWU3CHH0I=; b=i1jGe9DKxWBRjZVOgyy/gsZFdgBi5mvr9aaStUTlWH2UovlmN3HJsa8BbnCC63ccu1 OVMTAm45We8gP0MEDHAKtRRN3ggOaUUrQ6yDN4deS+sj1f31YU3QrGt2EWnMn33fbyoA KypWti9AkxgWg47/3LDe3SSpX6RWwDtdsr4xMMTLTCtWAqJaxwDqU/PqQzykwR2w4r0h n7j+24cOaLmGRDB1yVJTgfovDEFVAFhX0MESYKdWQf+uZm4NjXl7V0ErWTUJRoQEXYTM tPXScqscUAN5cJkpHax4l8wY2cx4U/ajAmBztiSfP2LeqY+KpNic10+7iPQM/B33w0Eu /Qgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="2uAMP/kY"; 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 d11-20020a170906640b00b006e81d2c3a0bsi581412ejm.841.2022.04.05.18.18.36; Tue, 05 Apr 2022 18:19:12 -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="2uAMP/kY"; 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 S1346286AbiDEJop (ORCPT + 99 others); Tue, 5 Apr 2022 05:44:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239779AbiDEIUw (ORCPT ); Tue, 5 Apr 2022 04:20:52 -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 3E233384; Tue, 5 Apr 2022 01:18:55 -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 D0F5C60B0F; Tue, 5 Apr 2022 08:18:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFFCFC385A1; Tue, 5 Apr 2022 08:18:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649146734; bh=U9Zv+Y3Z8XlZkTLdlXC99RStXbPoFoE2Q/8o2SY0dmw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2uAMP/kYHgmh/2lRbdSurwajwAr5CJIVdJ+CaRnw9KG+HqxQ/v4GcR0WwUpKJdSx+ 3qPvPLF+JuHnZKzyjexTaiNVJZIYj6aLJJLstKZtjiqlVqQF894QWcDKCbsB9dILd2 8cNC1oyrOOhpgjfh+nLB8oHMi277LPPxEVoylmdY= 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.17 0868/1126] spi: tegra20: Use of_device_get_match_data() Date: Tue, 5 Apr 2022 09:26:55 +0200 Message-Id: <20220405070433.015014919@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@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 2a03739a0c60..80c3787deea9 100644 --- a/drivers/spi/spi-tegra20-slink.c +++ b/drivers/spi/spi-tegra20-slink.c @@ -1006,14 +1006,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