From patchwork Mon Oct 30 13:54:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 159751 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp2230976vqb; Mon, 30 Oct 2023 06:54:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEWGKMV9CHIXoA7fdL6juO+7s8Hfjnj1msMosTaAgyqJTHiZKXKPKXXoIgTjrliomdmEXLN X-Received: by 2002:a05:6358:91aa:b0:168:e922:533 with SMTP id j42-20020a05635891aa00b00168e9220533mr6299371rwa.32.1698674082222; Mon, 30 Oct 2023 06:54:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698674082; cv=none; d=google.com; s=arc-20160816; b=UUkEsvkVPYygF19P/oFfwysEZO9wWimwq2/RIJffqLEdLopi8/7B/gN4Sy3734J4iO jHoNs5C9mBMhaWzt9FHUwtBl94Q/dW+p5mW6kgNWCEZf34Kvt1hrmSuuaBI3RZTpxgVS yXBPDD96RV32ER948Jt/aOVVeMjVusaWW7xdki7USWH5fFsvF0++/Jc7la32XNcvewT3 eTxSuJmQEOBKFG7lFHzsFJ0SeF0OafecqtDBrKo7Dz7QOE1bj1vsrMvKode98QcVWBd8 2AoVOVhmuIGAXFKQw16nTVhgs79ZgEzHs5YXaly/gCxV8s7lLmBOUFdxiVGlC6D+whc9 HtIQ== 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 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id m7-20020a633f07000000b005859c874eb5si4859648pga.275.2023.10.30.06.54.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 06:54:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 84A3980A18E6; Mon, 30 Oct 2023 06:54:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232268AbjJ3NyV (ORCPT + 31 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 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 fry.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 (fry.vger.email [0.0.0.0]); Mon, 30 Oct 2023 06:54:38 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781188874082507202 X-GMAIL-MSGID: 1781188874082507202 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 */