Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1527802pxb; Fri, 22 Jan 2021 19:48:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPBznKKhyyFTTUAh72zrB11mUTV8k4cJQ9s7ddUMRZy15MB3HpW5uuKD2EMUmOB5/Qx5mi X-Received: by 2002:aa7:d98a:: with SMTP id u10mr135563eds.275.1611373691013; Fri, 22 Jan 2021 19:48:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611373691; cv=none; d=google.com; s=arc-20160816; b=pvZ8SXOl5QZ+jZ4RMDxRtAT7WtF2NHH1G0JlWVsLm93RunI6uEC2oLd6Y9+FTLDLkO E/g6oI9T1TiBarNv0TY22OMBaKENww7z3L5md1YNymno3w0ujpvxWH8u/WIOna166xlj He7VdK8G294HXjhBQXQ5xtDCKRcFwuPfzyFX3/MB/GcyWefwj8XqzQOFpLpq0vEpDv3p dYWt28xz8aBc6KnxhQFH1D5slrR8fFdW7e+0td1d01TCAGSsjRmo321VVUSG5LYRm28c +dLR11DhEYFgbawENNuHjjzIhhIDddKUMG5sASFdaPuZUuHvTzpFnAUF3xXcOD0n3vkJ t2qg== 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=dJGIvDbFer174uYIU3S/UHlxuD0C4SN9Ba2a5uW/TjI=; b=ymDIG/cX83DT2MOGAd/z5CqkaLsW85Z1wp+SU7O1TsEqT8XSuGTthGj49mKDNijxAV naPpI2UCN8LcZh30YEN8X45ac6mDzOl5riJHOtG09+9xm2lzsgeQdqqz6/1flk0+9ckP xbrTjZ3YUv5lucB3HYWzaTUDRGkD845QT9RckYzYgplfMpHbUqSkuTWS3c9PMB+2M6rh ya+jYIkmnfqB4B3ty6xvTISgtOlzGCsLdmSbJ7nBFQ+qDjslmTcsAzXmnUsQgrZlaEut WLDX0O/zmCtBR1Qh6FPnJ6ysg+a52t019H+6inEmzNL1cnEA61LPuGdtDbRjehhsiQ1/ H+mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=OifXzFWy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n9si232245ejr.25.2021.01.22.19.47.46; Fri, 22 Jan 2021 19:48:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=OifXzFWy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726730AbhAWDqC (ORCPT + 99 others); Fri, 22 Jan 2021 22:46:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726689AbhAWDp4 (ORCPT ); Fri, 22 Jan 2021 22:45:56 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21831C0617AA for ; Fri, 22 Jan 2021 19:44:34 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id 31so4368273plb.10 for ; Fri, 22 Jan 2021 19:44:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dJGIvDbFer174uYIU3S/UHlxuD0C4SN9Ba2a5uW/TjI=; b=OifXzFWywulgTYIb9jiyHpcD9JRWqdvQpqyIxxU2D6tsvuICK7UAWAuNdhwL9zUrAR K+Nk1PB3vJuukAby67BHb75dLenU9dJldjAEfwR/2+8xvD7W58qyqrNjKfvj0OLfm/Vm zbEeseMkg52zIyx68ryB6lk3sZbv2Q8yvg+zE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dJGIvDbFer174uYIU3S/UHlxuD0C4SN9Ba2a5uW/TjI=; b=lQIxLkt1OuLm4J8RfDajePKY/R1/aS35RZhrsNq3bClFWG9nHSx8vy8UEvjcqTGg83 zVJXMeNbWG+b9bpswIi7RO/QQ8lYsNaI22IP7amsRxFSwRrXju8nBZLK8lSLgTnnttsG cAJnyaZ0jZtK4x+i7OHrKOMnEzqwK2m164MWsdMP6OYNpE47A5S6kv7hJLr+mGuZU+r9 Mw5Kh8jkW3a8XgmiZyRywI9igjEe4yGW3VXEeE5C9ITZtzvnzQuHFiNW5oXelSUqcQZc wV0MT2QgnPZD83fjPyG4mOFwOapRKRlWxuFq51WoozVyXoDPOnybJ48PHAS+Mkg5rDSW QVAg== X-Gm-Message-State: AOAM533oRZFCdri6bT4RelYJTF/0sVou647K/ZmTEhyQdSWhUgMW7Ibf TJEJCoXjJ6NHB/jnyjBN/Z/hdg== X-Received: by 2002:a17:90b:3792:: with SMTP id mz18mr8968978pjb.23.1611373473763; Fri, 22 Jan 2021 19:44:33 -0800 (PST) Received: from smtp.gmail.com ([2620:15c:202:201:3e52:82ff:fe6c:83ab]) by smtp.gmail.com with ESMTPSA id gf23sm10480343pjb.42.2021.01.22.19.44.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jan 2021 19:44:33 -0800 (PST) From: Stephen Boyd To: Rob Herring Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Mauro Carvalho Chehab , Jacopo Mondi , Arnd Bergmann , Geert Uytterhoeven , Jacopo Mondi , Mauro Carvalho Chehab , Rob Herring , Frank Rowand , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH v2 1/6] media: renesas-ceu: Use of_device_get_match_data() Date: Fri, 22 Jan 2021 19:44:23 -0800 Message-Id: <20210123034428.2841052-2-swboyd@chromium.org> X-Mailer: git-send-email 2.30.0.280.ga3ce27912f-goog In-Reply-To: <20210123034428.2841052-1-swboyd@chromium.org> References: <20210123034428.2841052-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This driver can use the replacement API instead of calling of_match_device() and then dereferencing the pointer that is returned. This nicely avoids referencing the match table when it is undefined with configurations where CONFIG_OF=n. Signed-off-by: Stephen Boyd Acked-by: Mauro Carvalho Chehab Acked-by: Jacopo Mondi Cc: Arnd Bergmann Cc: Geert Uytterhoeven Cc: Jacopo Mondi Cc: Mauro Carvalho Chehab Cc: Rob Herring Cc: Frank Rowand Cc: Cc: --- Please ack so Rob can apply. drivers/media/platform/renesas-ceu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/renesas-ceu.c b/drivers/media/platform/renesas-ceu.c index 4a633ad0e8fa..352e7c84d5ba 100644 --- a/drivers/media/platform/renesas-ceu.c +++ b/drivers/media/platform/renesas-ceu.c @@ -1679,7 +1679,7 @@ static int ceu_probe(struct platform_device *pdev) v4l2_async_notifier_init(&ceudev->notifier); if (IS_ENABLED(CONFIG_OF) && dev->of_node) { - ceu_data = of_match_device(ceu_of_match, dev)->data; + ceu_data = of_device_get_match_data(dev); num_subdevs = ceu_parse_dt(ceudev); } else if (dev->platform_data) { /* Assume SH4 if booting with platform data. */ -- https://chromeos.dev