Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2754314rdh; Mon, 30 Oct 2023 06:54:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEoI7yir2pxKaii0Mwi6kTszanourDNGiGPIHN+pmtwrmq55UUzqvjzS3KPfkdmCJwDn9BG X-Received: by 2002:a05:6a20:12c7:b0:14c:3218:c1bd with SMTP id v7-20020a056a2012c700b0014c3218c1bdmr12048858pzg.11.1698674075309; Mon, 30 Oct 2023 06:54:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698674075; cv=none; d=google.com; s=arc-20160816; b=vCtQDuhiZkXbqcxF7suZHQP9J/mJBTTqNz0oNQWMfo+wB7JcpJTQPfZJ0Q+KddS9ZN 0iy4A2zQr8eRjRfGmGH/tnTRZ3QjWTwPOOs+iwst67KI8HCvAcwDU4JNOucYLga9zcgI uok1JQFzdnRxe60YXl9NzCFuOBJSzcvCfz+OMuUjZioKMiJSV+Qs6r5Crmd/nIptpZzL xXNk/8sxDEyU+GosjIlJVowI8kprirePtRmLB/wFJgpvd9YfmAZ3kRKXOy+oBGz3rqDh pVCLZVUwfdOw7/3vmmN2YSH9GueP7uGM6Iu5Ek8hJW/p89sJM46dnORIboTNhINb1LpU Dfwg== 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 :message-id:date:subject:cc:to:from; bh=bonHmR4fbjmc64kWSY8Ujz6X/PEeEcKaN4Sq4MHNuq4=; fh=HGXoh0Br9LbyglKQx41EKps/jGAFVzD0Or0NSzETxy0=; b=jaCIdq9Fx0+Bmn8iAhoCJZTBBxcuU9kxretVO795MjejU0NGJipUy9ljRJYmDQCZFr pHC9my4IfQYc7cSq7R71b4epkbm/xBQka8y0dfgdzUFgYlQGpfWpocUbmGC8gPHb0I8M ZAoDFjkkiEy/oHWU698QK+50YPtSHDiN/Ree4RGtGo6ZGYuiN1nHATWKWHoxbsngj5xr GUX+aZQw6WIFY78eflSDmkRLgjd2TjpA0Rbd5AkCPxzvs+jsdRkbjh5eHB/2R9q3+Nq7 QUiYlv66tTV3Jel/P5vImrwpSkKVbm7xJIeAnoQeJn7HFCunGfLrEDyLI1xDPEyZbi3a V2qg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id h18-20020a17090acf1200b0028031758019si3020787pju.32.2023.10.30.06.54.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 06:54:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 90E12809C4E3; Mon, 30 Oct 2023 06:54:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232231AbjJ3NyV (ORCPT + 99 others); Mon, 30 Oct 2023 09:54:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbjJ3NyT (ORCPT ); Mon, 30 Oct 2023 09:54:19 -0400 Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62B87B3; Mon, 30 Oct 2023 06:54:17 -0700 (PDT) Received: by mail-oi1-f169.google.com with SMTP id 5614622812f47-3b2b1af09c5so2225562b6e.0; Mon, 30 Oct 2023 06:54:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698674056; x=1699278856; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bonHmR4fbjmc64kWSY8Ujz6X/PEeEcKaN4Sq4MHNuq4=; b=kTAUceLaIx1FAVOrxVO/G3pH9hdZcXRY3NW+KNFm75HJSMfOjv4MNL0kpKBF+MTWpH UoVlo5C/8RakDz/OJ9PCsUv6SNZAEvaaR7YnQLCRQaYK4skfRU0W30qtPZ3pupi9dSiY OseT7bzmBqJjqqPdAFXHooIvBOgkx6lphb2+D5O5uvVSCmY4cGx0lghghH74p+286WB7 fLCMKYEby8Icnum9DIjHICkiVpEO+An+lV30GJ2EBLtxOJfqev+Jb8iaZN3Gs06CFw11 xwQGt1I3gD2DqklM9EQ9HzphcnOdBM30AV33gnjYPA6YB7dfu1R8oQmliqHWFLQYdiqV tkqQ== X-Gm-Message-State: AOJu0YwpC7HIABNLkskgyyphks+m9iMD8GACH36iTemHpJBZPpwDAokR 9JumYCNRRJFlgVrCNB47lpsMCGMiJA== X-Received: by 2002:a05:6808:6399:b0:3a7:4161:44ee with SMTP id ec25-20020a056808639900b003a7416144eemr7557546oib.6.1698674056627; Mon, 30 Oct 2023 06:54:16 -0700 (PDT) Received: from herring.priv (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id i13-20020a056808030d00b003afe5617691sm1370651oie.12.2023.10.30.06.54.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 06:54:15 -0700 (PDT) Received: (nullmailer pid 776890 invoked by uid 1000); Mon, 30 Oct 2023 13:54:14 -0000 From: Rob Herring To: Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RESEND PATCH] opp: ti: Use device_get_match_data() Date: Mon, 30 Oct 2023 08:54:10 -0500 Message-ID: <20231030135411.776744-1-robh@kernel.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 30 Oct 2023 06:54:32 -0700 (PDT) Signed-off-by: Rob Herring --- drivers/opp/ti-opp-supply.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/opp/ti-opp-supply.c b/drivers/opp/ti-opp-supply.c index 8f3f13fbbb25..e3b97cd1fbbf 100644 --- a/drivers/opp/ti-opp-supply.c +++ b/drivers/opp/ti-opp-supply.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -373,23 +374,15 @@ static int ti_opp_supply_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device *cpu_dev = get_cpu_device(0); - const struct of_device_id *match; const struct ti_opp_supply_of_data *of_data; int ret = 0; - match = of_match_device(ti_opp_supply_of_match, dev); - if (!match) { - /* We do not expect this to happen */ - dev_err(dev, "%s: Unable to match device\n", __func__); - return -ENODEV; - } - if (!match->data) { + of_data = device_get_match_data(dev); + if (!of_data) { /* Again, unlikely.. but mistakes do happen */ dev_err(dev, "%s: Bad data in match\n", __func__); return -EINVAL; } - of_data = match->data; - dev_set_drvdata(dev, (void *)of_data); /* If we need optimized voltage */ -- 2.42.0