From patchwork Sat Jan 23 03:44:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 370031 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 822C7C4332B for ; Sat, 23 Jan 2021 03:47:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5B0F023B2A for ; Sat, 23 Jan 2021 03:47:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726896AbhAWDrH (ORCPT ); Fri, 22 Jan 2021 22:47:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726891AbhAWDqj (ORCPT ); Fri, 22 Jan 2021 22:46:39 -0500 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7658C061224 for ; Fri, 22 Jan 2021 19:44:39 -0800 (PST) Received: by mail-pj1-x1029.google.com with SMTP id g15so5101619pjd.2 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=FHWKS+icSssBk7PjBBMlFwu572VR5mh5tFdl2H4xxQKUmiG63RJ8MKrpESp+xp3E03 PoYYgG55ErYp9Pc1a47RuVaLsrpMsUeEOBKagbHR9bVpBqvcYeZQB/UoTPluF0dLcY87 IdlyvA0pQpzQmuOnzMqPs7fS5dlnWe2mzvQMtBYQPGoummgcMLTALC5icfGXV4mDTWCp IGpqm299iG6QyKJxG9+pnhxDPuxteyAKnfD8PV/Aq5TzVi+nd3poKkyorBppoyY3A16t +q4Uvnt1EZ2ScnAcznJFOu2QRaG0wbKXLHeGBJri7DHhHCT28X0CKEGvjNXxoz+XYD46 sZ9Q== X-Gm-Message-State: AOAM530Rxpsc8ZK+yi9HbikTTXu9/1KX7ZkV7IF9RtbMg9BMiW4wRvFG 1ys4JkvCbStcZB2Y3uvtcXLLuA== X-Google-Smtp-Source: ABdhPJxjpyrtoHQKuXYDd99QrdPxjgxKSzYNJ0kZP6Q5tAl++sVk8vA/tI1Q8vi4PiUjKULQZ/QwNQ== 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 Precedence: bulk List-ID: X-Mailing-List: devicetree@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 {