All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] mfd: core: Make use of device_set_node()
@ 2024-05-30 11:51 Andy Shevchenko
  2024-05-31  7:37 ` Herve Codina
  2024-05-31 17:06 ` (subset) " Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2024-05-30 11:51 UTC (permalink / raw)
  To: Lee Jones, Herve Codina, linux-kernel; +Cc: Andy Shevchenko

Use device_set_node() instead of assigning pdev->dev.of_node
directly because it also sets the firmware node.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mfd/mfd-core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index 6ad5c93027af..7ea9a875d8f3 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -87,7 +87,7 @@ static void mfd_acpi_add_device(const struct mfd_cell *cell,
 		}
 	}
 
-	ACPI_COMPANION_SET(&pdev->dev, adev ?: parent);
+	device_set_node(&pdev->dev, acpi_fwnode_handle(adev ?: parent));
 }
 #else
 static inline void mfd_acpi_add_device(const struct mfd_cell *cell,
@@ -131,8 +131,7 @@ static int mfd_match_of_node_to_dev(struct platform_device *pdev,
 	of_entry->np = np;
 	list_add_tail(&of_entry->list, &mfd_of_node_list);
 
-	pdev->dev.of_node = np;
-	pdev->dev.fwnode = &np->fwnode;
+	device_set_node(&pdev->dev, of_fwnode_handle(np));
 #endif
 	return 0;
 }
-- 
2.43.0.rc1.1336.g36b5255a03ac


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

* Re: [PATCH v1 1/1] mfd: core: Make use of device_set_node()
  2024-05-30 11:51 [PATCH v1 1/1] mfd: core: Make use of device_set_node() Andy Shevchenko
@ 2024-05-31  7:37 ` Herve Codina
  2024-05-31 17:06 ` (subset) " Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Herve Codina @ 2024-05-31  7:37 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Lee Jones, linux-kernel

Hi Andy,

On Thu, 30 May 2024 14:51:47 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> Use device_set_node() instead of assigning pdev->dev.of_node
> directly because it also sets the firmware node.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Herve Codina <herve.codina@bootlin.com>

Best regards,
Hervé

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

* Re: (subset) [PATCH v1 1/1] mfd: core: Make use of device_set_node()
  2024-05-30 11:51 [PATCH v1 1/1] mfd: core: Make use of device_set_node() Andy Shevchenko
  2024-05-31  7:37 ` Herve Codina
@ 2024-05-31 17:06 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2024-05-31 17:06 UTC (permalink / raw)
  To: Lee Jones, Herve Codina, linux-kernel, Andy Shevchenko

On Thu, 30 May 2024 14:51:47 +0300, Andy Shevchenko wrote:
> Use device_set_node() instead of assigning pdev->dev.of_node
> directly because it also sets the firmware node.
> 
> 

Applied, thanks!

[1/1] mfd: core: Make use of device_set_node()
      commit: 03ab12796acff74d1c0e8278569499f989134377

--
Lee Jones [李琼斯]


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

end of thread, other threads:[~2024-05-31 17:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-30 11:51 [PATCH v1 1/1] mfd: core: Make use of device_set_node() Andy Shevchenko
2024-05-31  7:37 ` Herve Codina
2024-05-31 17:06 ` (subset) " Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.