linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spmi: hisi-spmi-controller: Drop duplicated OF node assignment in spmi_controller_probe()
@ 2025-01-16  4:47 Joe Hattori
  2025-01-16  4:52 ` Joe Hattori
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Hattori @ 2025-01-16  4:47 UTC (permalink / raw)
  To: mchehab+huawei, sboyd
  Cc: konradybcio, matthias.bgg, angelogioacchino.delregno,
	marijn.suijten, bjorn.andersson, abel.vesa, linux-arm-kernel,
	linux-mediatek, Joe Hattori

spmi_controller_probe() assigns a parent device and an OF node to an
SPMI controller. However, the operations are not needed as they are
already assigned in spmi_controller_alloc(). Thus, remove the duplicated
assignments. An unnecessary OF node reference acquisition is also
dropped by this patch.

Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Suggested-by: Stephen Boyd <sboyd@kernel.org>
---
 drivers/spmi/hisi-spmi-controller.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/spmi/hisi-spmi-controller.c b/drivers/spmi/hisi-spmi-controller.c
index 3cafdf22c909..122140b97579 100644
--- a/drivers/spmi/hisi-spmi-controller.c
+++ b/drivers/spmi/hisi-spmi-controller.c
@@ -300,9 +300,6 @@ static int spmi_controller_probe(struct platform_device *pdev)
 
 	spin_lock_init(&spmi_controller->lock);
 
-	ctrl->dev.parent = pdev->dev.parent;
-	ctrl->dev.of_node = of_node_get(pdev->dev.of_node);
-
 	/* Callbacks */
 	ctrl->read_cmd = spmi_read_cmd;
 	ctrl->write_cmd = spmi_write_cmd;
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] spmi: hisi-spmi-controller: Drop duplicated OF node assignment in spmi_controller_probe()
@ 2025-01-16  4:49 Joe Hattori
  2025-01-16 22:48 ` Stephen Boyd
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Hattori @ 2025-01-16  4:49 UTC (permalink / raw)
  To: mchehab+huawei, sboyd
  Cc: linux-kernel, konradybcio, matthias.bgg,
	angelogioacchino.delregno, marijn.suijten, bjorn.andersson,
	abel.vesa, linux-arm-kernel, linux-mediatek, Joe Hattori

spmi_controller_probe() assigns a parent device and an OF node to an
SPMI controller. However, the operations are not needed as they are
already assigned in spmi_controller_alloc(). Thus, remove the duplicated
assignments. An unnecessary OF node reference acquisition is also
dropped by this patch.

Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Suggested-by: Stephen Boyd <sboyd@kernel.org>
---
 drivers/spmi/hisi-spmi-controller.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/spmi/hisi-spmi-controller.c b/drivers/spmi/hisi-spmi-controller.c
index 3cafdf22c909..122140b97579 100644
--- a/drivers/spmi/hisi-spmi-controller.c
+++ b/drivers/spmi/hisi-spmi-controller.c
@@ -300,9 +300,6 @@ static int spmi_controller_probe(struct platform_device *pdev)
 
 	spin_lock_init(&spmi_controller->lock);
 
-	ctrl->dev.parent = pdev->dev.parent;
-	ctrl->dev.of_node = of_node_get(pdev->dev.of_node);
-
 	/* Callbacks */
 	ctrl->read_cmd = spmi_read_cmd;
 	ctrl->write_cmd = spmi_write_cmd;
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] spmi: hisi-spmi-controller: Drop duplicated OF node assignment in spmi_controller_probe()
  2025-01-16  4:47 Joe Hattori
@ 2025-01-16  4:52 ` Joe Hattori
  0 siblings, 0 replies; 4+ messages in thread
From: Joe Hattori @ 2025-01-16  4:52 UTC (permalink / raw)
  To: mchehab+huawei, sboyd
  Cc: konradybcio, matthias.bgg, angelogioacchino.delregno,
	marijn.suijten, bjorn.andersson, abel.vesa, linux-arm-kernel,
	linux-mediatek



On 1/16/25 13:47, Joe Hattori wrote:
> spmi_controller_probe() assigns a parent device and an OF node to an
> SPMI controller. However, the operations are not needed as they are
> already assigned in spmi_controller_alloc(). Thus, remove the duplicated
> assignments. An unnecessary OF node reference acquisition is also
> dropped by this patch.
> 
> Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>est,
> Suggested-by: Stephen Boyd <sboyd@kernel.org>
> ---
>   drivers/spmi/hisi-spmi-controller.c | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/spmi/hisi-spmi-controller.c b/drivers/spmi/hisi-spmi-controller.c
> index 3cafdf22c909..122140b97579 100644
> --- a/drivers/spmi/hisi-spmi-controller.c
> +++ b/drivers/spmi/hisi-spmi-controller.c
> @@ -300,9 +300,6 @@ static int spmi_controller_probe(struct platform_device *pdev)
>   
>   	spin_lock_init(&spmi_controller->lock);
>   
> -	ctrl->dev.parent = pdev->dev.parent;
> -	ctrl->dev.of_node = of_node_get(pdev->dev.of_node);
> -
>   	/* Callbacks */
>   	ctrl->read_cmd = spmi_read_cmd;
>   	ctrl->write_cmd = spmi_write_cmd;

Kindly disregard this patch since I forgot to CC 
linux-kernel@vger.kernel.org. The new patch can be found at
https://lore.kernel.org/all/20250116044725.2946205-1-joe@pf.is.s.u-tokyo.ac.jp/

Best,
Joe


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] spmi: hisi-spmi-controller: Drop duplicated OF node assignment in spmi_controller_probe()
  2025-01-16  4:49 [PATCH] spmi: hisi-spmi-controller: Drop duplicated OF node assignment in spmi_controller_probe() Joe Hattori
@ 2025-01-16 22:48 ` Stephen Boyd
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2025-01-16 22:48 UTC (permalink / raw)
  To: Joe Hattori, mchehab+huawei
  Cc: linux-kernel, konradybcio, matthias.bgg,
	angelogioacchino.delregno, marijn.suijten, bjorn.andersson,
	abel.vesa, linux-arm-kernel, linux-mediatek, Joe Hattori

Quoting Joe Hattori (2025-01-15 20:49:07)
> spmi_controller_probe() assigns a parent device and an OF node to an
> SPMI controller. However, the operations are not needed as they are
> already assigned in spmi_controller_alloc(). Thus, remove the duplicated
> assignments. An unnecessary OF node reference acquisition is also
> dropped by this patch.
> 
> Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
> Suggested-by: Stephen Boyd <sboyd@kernel.org>
> ---

Applied to spmi-next


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-01-16 22:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-16  4:49 [PATCH] spmi: hisi-spmi-controller: Drop duplicated OF node assignment in spmi_controller_probe() Joe Hattori
2025-01-16 22:48 ` Stephen Boyd
  -- strict thread matches above, loose matches on Subject: below --
2025-01-16  4:47 Joe Hattori
2025-01-16  4:52 ` Joe Hattori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).