From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Lee Jones <lee@kernel.org>,
Herve Codina <herve.codina@bootlin.com>,
linux-kernel@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 1/1] mfd: core: Make use of device_set_node()
Date: Thu, 30 May 2024 14:51:47 +0300 [thread overview]
Message-ID: <20240530115147.1112498-1-andriy.shevchenko@linux.intel.com> (raw)
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
next reply other threads:[~2024-05-30 11:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-30 11:51 Andy Shevchenko [this message]
2024-05-31 7:37 ` Herve Codina
2024-05-31 17:06 ` (subset) " Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240530115147.1112498-1-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=herve.codina@bootlin.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome