Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1528432pxb; Fri, 22 Jan 2021 19:49:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJwsBG/eEvs3MJwxk/gFX5xQXevuFNqGCeKBYe6EvTsGnUkAOBZUEPg0xBaKfRBHI8Y1y2OZ X-Received: by 2002:aa7:cc18:: with SMTP id q24mr49832edt.82.1611373795495; Fri, 22 Jan 2021 19:49:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611373795; cv=none; d=google.com; s=arc-20160816; b=CTRoho5xNhbAOXQDAhIEbol+wzbw4jMDxx+qiFNAUpZ7mch1xztc5uN0dbfi/aE1OU jfIwifCjLqSKjX84u7wXz/Twnj4X+dF1fNAuVTy2c80wECahJkhMJ9lY1yabB0YSOybC y4YQ6e4m2aDuTRNdoJlQY5tiIx4/e2s+mwxwCMkdSpV4oCZ1r1TxAn9NMMuwf9JzJ0zA aOcWqhFBR9+VeUb0P0TfbKVxVC6dlfRTZeaCxSKyMpuVLfnTxNuXM7PCgwl7+Q1DiOK0 K+xTziejbspiyNXuG5NYbS40mJaoE5uegIM95jIGGFypjjvM2o0NKZeZ31xfhLSiNgXg FB+Q== 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=xR8YQMKfgP2HW7WhNJdeAV7/ctNsHW3A/OLYCiFLrok=; b=emhi+bqJwqUTPlO/882Hf4J6MER9RZtTErKpeapbstApzuZ6LLcgZphOyl8bybp799 Qca4NdpMqVKQ+dg6N+5Q6o+9nrkU3CZRAkFR2D61aEIk+LrEMruFs8MLWXWVwWcS6oU2 QNO8EXe2y/+KQODt5pFCnC6dG3ZRJ1ZRySLlrtE3OFM0HXPo/Otn66CPNfwmQY7INKO3 TxQvABBpdnKqa/0HeR4ZGpSdmocB7w1kEo9/2TIZ5t7Oy3XTPYxggJT7A1hnc1p6dJoV QS6Kh6951T+LtRc9hBQZ9J1ODuMAkFhSXHn0pht/cUaSqlHEMwCpNJokr7gUJXgNLnM6 qP7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="b639/5WX"; 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 ws14si2109784ejb.625.2021.01.22.19.49.32; Fri, 22 Jan 2021 19:49:55 -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="b639/5WX"; 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 S1726660AbhAWDr2 (ORCPT + 99 others); Fri, 22 Jan 2021 22:47:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726889AbhAWDqh (ORCPT ); Fri, 22 Jan 2021 22:46:37 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6945C061222 for ; Fri, 22 Jan 2021 19:44:39 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id m5so5081674pjv.5 for ; Fri, 22 Jan 2021 19:44:39 -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=xR8YQMKfgP2HW7WhNJdeAV7/ctNsHW3A/OLYCiFLrok=; b=b639/5WXIPJKT58P9xeSP1JaicOfVaw68rgoB6ixWuLWuRnjv1R9nhdQmvtIQhf5uv sb8QrtLVBCaVNE/ke2X86B8/akvUSiqo5kNEP1p92wvub6eoMEDRgD6O2KGV/aAHj90A MBRtkikOQMmUqYogC9xlA1SIGLpgORIJq6e30= 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=xR8YQMKfgP2HW7WhNJdeAV7/ctNsHW3A/OLYCiFLrok=; b=oB245lUOrOoRheHzDXHINjTzi/RHCXXRJs+HnrRu6TSXwlJfE6Ns2DPUZbhR8ccrOB 9j5iq4ZCFSi17p9ffn62l7YrcHfWMU3F5Uf0K1gq1eQZdJlUYs38mS63QEfs5zQFrVO9 ji4aL8PAt6eLb3Nb9C3CuRTpfGgwod6QF1GU70ogWx7krssdZFlpm6BWYvGFFjqRWjc9 MB5d35qn0uIosFdQsnmq1qfSIoPxRHjUeeGMjEyBvd9DaIAswrydAxwuX+7ZGjR+VK+p RAYi5q3Kcy6EZ+9/LjoDX5XHzIxLgep16a1l52DS7F0pBWWIZ4XoDv/oyT7p49RPeT1w 3Ovg== X-Gm-Message-State: AOAM530gA4tfYRfx3wzn6mH+h+/OHJmGA4XggVkZdqej7ZliNiZcYXjH +8ABoBBdHS3tdbOpq7+4LsCuyw== X-Received: by 2002:a17:90a:5d13:: with SMTP id s19mr3332843pji.110.1611373479572; Fri, 22 Jan 2021 19:44:39 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jan 2021 19:44:39 -0800 (PST) From: Stephen Boyd To: Rob Herring Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Guenter Roeck , Arnd Bergmann , Geert Uytterhoeven , Jean Delvare , Rob Herring , Frank Rowand , linux-hwmon@vger.kernel.org Subject: [PATCH v2 5/6] hwmon: (lm70) Avoid undefined reference to match table Date: Fri, 22 Jan 2021 19:44:27 -0800 Message-Id: <20210123034428.2841052-6-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 We're going to remove of_match_ptr() from the definition of of_match_device() when CONFIG_OF=n. This way we can always be certain that of_match_device() acts the same when CONFIG_OF is set and when it isn't. Add of_match_ptr() here so that this doesn't break when that change is made to the of_match_device() API. Signed-off-by: Stephen Boyd Acked-by: Guenter Roeck Cc: Arnd Bergmann Cc: Geert Uytterhoeven Cc: Jean Delvare Cc: Guenter Roeck Cc: Rob Herring Cc: Frank Rowand Cc: --- Please ack so Rob can apply. drivers/hwmon/lm70.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/lm70.c b/drivers/hwmon/lm70.c index ae2b84263a44..e3153ae80634 100644 --- a/drivers/hwmon/lm70.c +++ b/drivers/hwmon/lm70.c @@ -178,7 +178,7 @@ static int lm70_probe(struct spi_device *spi) struct lm70 *p_lm70; int chip; - of_match = of_match_device(lm70_of_ids, &spi->dev); + of_match = of_match_device(of_match_ptr(lm70_of_ids), &spi->dev); if (of_match) chip = (int)(uintptr_t)of_match->data; else { -- https://chromeos.dev