Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2925991rwb; Mon, 15 Aug 2022 14:11:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Y8aPh/LOjdcw/AROd1j44UEYDlyl+IiieaYJVuHPdBg+IDg/D1wnEQH4cPVRmCYEN8qZs X-Received: by 2002:a05:6402:3514:b0:440:5538:3a97 with SMTP id b20-20020a056402351400b0044055383a97mr16177425edd.165.1660597865893; Mon, 15 Aug 2022 14:11:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660597865; cv=none; d=google.com; s=arc-20160816; b=DkdpWZpX+ATGNOap/VcKugwPNfpNOBz9v591VKkI2s6qw8gwcZF5eWnY0kfz1UMxtK eKKWlWvczO5FjSXiJDwYO1tk8kyTKfwoGCd81ZFwd1kD4BIqIUAlm9lC2nKGidX5HK2N XeYDtr9r1lJ2In6otvdoQyCv2+pDJZq4lj7nFTBDpZpfC+jgfCO4DFhJ5SNrgBm0c6FT pd/O/TXLhX/qzRf6Y9Bi5YaoI9ugGNjC9kJpjqfRIp//0YIQOeXROVUawLmD8a2BTItS lrUmB0TGgDoo+MEZ4awvgsKLoPHu9Td8c0yvIwvl14ApVZTTZCDxynGVKgPobkIfH7id KW/A== 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=6y/9KYWmso4JJUTqKQ1ubcpiVnVbEKtgHFOQsMnNq0E=; b=S065Ic4CuLluSuL+DQNeVyl68Umr6qZCt9g707+sNNxjTJE4KpXki35QqDGQ5LO+ii JpEnFaDKxsLLssCXGwvyOVp3Oqd8BBOZREunXar+3al0tAUIMJJmvmK36cNOW15L97fJ CRHIQAmwz2ENRx1g0V+3nYoSMlLbsgS/nQgdUFQdhRU7rOIUE5vKKejDc6NvdBgTYk9D knJsxD9u5+yajLhOa7B7Il65GKNMOnko3NIRALGA7SQmRCP72tr8h4g9OJZT0b3JfoMX Wvkl92E0uojL/YytHI1bXa/yqFs0k6BcSeRs8VfVE6lQyXUkPH97O9I8XdZIhR7+j6Hq /71Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=chgWhflh; 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 eb9-20020a0564020d0900b0043e18c8248asi9518951edb.600.2022.08.15.14.10.40; Mon, 15 Aug 2022 14:11:05 -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=chgWhflh; 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 S232138AbiHOS6S (ORCPT + 99 others); Mon, 15 Aug 2022 14:58:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244650AbiHOSzg (ORCPT ); Mon, 15 Aug 2022 14:55:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC41048CB9; Mon, 15 Aug 2022 11:30:11 -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 015A060EEB; Mon, 15 Aug 2022 18:30:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 087FDC433D7; Mon, 15 Aug 2022 18:30:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588210; bh=eQjlNsFUeo7Ol1B/gW2YN5f5GReWLkx2orpeVdoEiDQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=chgWhflh6GnDQXhwER+cbG3zsc+FgbhwFwK+Cek3E7ag8Gu9AfMe2vAg7vAj9cClp brtGCCTiyQicrzJK7Q5j0bkI3j4KGI1dl6xKXzXVxiZ2AiEO0qYyAlO1whdUKeQC8b O9Zs2UE6MivllzedHM8EWA9cpr7dMXGcX+TNMDZE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zeal Robot , "Minghao Chi (CGEL ZTE)" , Maxime Ripard , Sasha Levin Subject: [PATCH 5.15 298/779] drm/vc4: Use of_device_get_match_data() Date: Mon, 15 Aug 2022 19:59:02 +0200 Message-Id: <20220815180350.024639631@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 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 (CGEL ZTE) [ Upstream commit 9cbe89ede58294d23af06ec12c20f2ce6acc1892 ] Use of_device_get_match_data() to simplify the code. Reported-by: Zeal Robot Signed-off-by: Minghao Chi (CGEL ZTE) Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20220214020530.1714631-1-chi.minghao@zte.com.cn Signed-off-by: Sasha Levin --- drivers/gpu/drm/vc4/vc4_dsi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c index 64dfefeb03f5..98308a17e4ed 100644 --- a/drivers/gpu/drm/vc4/vc4_dsi.c +++ b/drivers/gpu/drm/vc4/vc4_dsi.c @@ -1493,15 +1493,10 @@ static int vc4_dsi_bind(struct device *dev, struct device *master, void *data) struct drm_device *drm = dev_get_drvdata(master); struct vc4_dsi *dsi = dev_get_drvdata(dev); struct vc4_dsi_encoder *vc4_dsi_encoder; - const struct of_device_id *match; dma_cap_mask_t dma_mask; int ret; - match = of_match_device(vc4_dsi_dt_match, dev); - if (!match) - return -ENODEV; - - dsi->variant = match->data; + dsi->variant = of_device_get_match_data(dev); vc4_dsi_encoder = devm_kzalloc(dev, sizeof(*vc4_dsi_encoder), GFP_KERNEL); -- 2.35.1