From patchwork Fri Jun 16 21:10:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakob Hauser X-Patchwork-Id: 693543 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65C43EB64D8 for ; Fri, 16 Jun 2023 21:11:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345724AbjFPVLd (ORCPT ); Fri, 16 Jun 2023 17:11:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345566AbjFPVL1 (ORCPT ); Fri, 16 Jun 2023 17:11:27 -0400 Received: from sonic306-21.consmr.mail.ir2.yahoo.com (sonic306-21.consmr.mail.ir2.yahoo.com [77.238.176.207]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A2F2359D for ; Fri, 16 Jun 2023 14:11:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rocketmail.com; s=s2048; t=1686949884; bh=2W0/s9Ei/3O15AUKoqqy+U+PAyRYFPdruzdJ33WOGco=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Subject:Reply-To; b=IlbipCUnNwFJWBJMWof8BoQrRUxxcHM+casc6zwXMefAcLU4ICOt0KxjWc329Esd+HiWUrNKs/mP/Lnxwfm98qnRzCXMC5NpBSdmQH8SC29RnIE5T9OCQUbpOUL4HLco9reM2mjwqQEIzKpt3hDDOs8l7Gtr+xaeg7kBWk4MfOep/mpX248EzKVTJPA9ARIMmCTWcLlQvTy1JkPnMPO/bS5S9ZCR75iUr7gtnSkdbon9QoBsgfEqyQjFjh7iWqmZt8afYVnxKd0nNinzjtHlHK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jGLhySdiSff q7QlJD_PQM2QnhBFvsuuYfWND9TE_TS.P73.0fwXPaPpFS2tEgYlBGFrrOxuK4f8WtuqF3HXPmlL bflq4vBoqhnXLMHYk6n6kYBzyM5oPKnxnbcGJnTLdo351C57b5cvaMjgeeAtaxxHlJy3x3zwv8q8 ISVWMP4DCgb0tagzHbviMdbMnGLgtKikxXSpzeduWgEbUoZ3kLR6uXPG._KrWFF8_uvJSNLKbn6D THiaJMukf1bAH5FF8mSz.N1xg7RtbRi_5CVDiOyVsmJiWBISaNR1hRJEPL9ZKiM.bs6uYd2WZmeu yHVhjn2KywLgC9xhKVfVW0NuYVfNz9kXnNkOQXsPUfPmYDdnJiD1RkRifYSXI8WiATRec.SKOgxb 6oFC.KETpTdyg6aBTtxE_BDKAUcUfAj28keIwI9AOyZt0wHpD_TZxTcWdDR0fv9.VM.Gn_S32iMw PjCDjz5GthAXJKcDzkhnY3P9dpsDv4i0Y2GRgoVqwU2glquDoBIYHB8hkfZI53DzRLKFgenpIpjH 0XG3.KbeTvo3bmMBV_1Y7vACxJKGG6dapu7FmeoeMbj05hg.QiW9g4C7k7x0JZdz29jK7OXP0YO9 BvCxNRQcQSKUJjz8KJ85EWLFMOYAmb77aXQq_iMyEDAV5VHsFZpdx3lKFjC_QRuDgwCG6a6AyL7U F0kzalVh9ibkeLeAM3cVju8tkmYPr6xGKFrdwG3U6BLHDfCVGpTzKbXPdP08XaiBJhhnjJuh48ek N92Xo2ROKHnls1hR0l5p9peOusLlp41zXNA-- X-Sonic-MF: X-Sonic-ID: 5be4c50b-e39c-4e3f-8b4e-f2655f0c20ef Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ir2.yahoo.com with HTTP; Fri, 16 Jun 2023 21:11:24 +0000 Received: by hermes--production-ir2-7867f454fc-gg9x8 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID c618d34c94eed5ad1e4505ee686233db; Fri, 16 Jun 2023 21:11:18 +0000 (UTC) From: Jakob Hauser To: Sebastian Reichel Cc: Lee Jones , Christophe Jaillet , Stephan Gerhold , Raymond Hackley , Henrik Grimler , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Jakob Hauser Subject: [PATCH 2/2] power: supply: rt5033_charger: Replace "&pdev->dev" by "charger->dev" in probe Date: Fri, 16 Jun 2023 23:10:48 +0200 Message-Id: <99b76d5ed0d47f55ddbf55564a0424d67af1a447.1686948074.git.jahau@rocketmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org At the beginning of the probe function, "charger->dev" is set equal to "&pdev->dev". Therefore it's more clear to subsequently use "charger->dev" instead of "&pdev->dev". Signed-off-by: Jakob Hauser --- drivers/power/supply/rt5033_charger.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/power/supply/rt5033_charger.c b/drivers/power/supply/rt5033_charger.c index 361a36c2a195..71a237cd1d61 100644 --- a/drivers/power/supply/rt5033_charger.c +++ b/drivers/power/supply/rt5033_charger.c @@ -667,11 +667,11 @@ static int rt5033_charger_probe(struct platform_device *pdev) psy_cfg.of_node = pdev->dev.of_node; psy_cfg.drv_data = charger; - charger->psy = devm_power_supply_register(&pdev->dev, + charger->psy = devm_power_supply_register(charger->dev, &rt5033_charger_desc, &psy_cfg); if (IS_ERR(charger->psy)) - return dev_err_probe(&pdev->dev, PTR_ERR(charger->psy), + return dev_err_probe(charger->dev, PTR_ERR(charger->psy), "Failed to register power supply\n"); ret = rt5033_charger_dt_init(charger); @@ -690,22 +690,22 @@ static int rt5033_charger_probe(struct platform_device *pdev) np_edev = of_get_parent(np_conn); charger->edev = extcon_find_edev_by_node(np_edev); if (IS_ERR(charger->edev)) { - dev_warn(&pdev->dev, "no extcon device found in device-tree\n"); + dev_warn(charger->dev, "no extcon device found in device-tree\n"); goto out; } - ret = devm_work_autocancel(&pdev->dev, &charger->extcon_work, + ret = devm_work_autocancel(charger->dev, &charger->extcon_work, rt5033_charger_extcon_work); if (ret) { - dev_err(&pdev->dev, "failed to initialize extcon work\n"); + dev_err(charger->dev, "failed to initialize extcon work\n"); return ret; } charger->extcon_nb.notifier_call = rt5033_charger_extcon_notifier; - ret = devm_extcon_register_notifier_all(&pdev->dev, charger->edev, + ret = devm_extcon_register_notifier_all(charger->dev, charger->edev, &charger->extcon_nb); if (ret) { - dev_err(&pdev->dev, "failed to register extcon notifier\n"); + dev_err(charger->dev, "failed to register extcon notifier\n"); return ret; } out: