* [PATCH] PCI/pwrctl: pwrseq: don't use OF-specific routines
@ 2024-10-04 12:58 Bartosz Golaszewski
2024-10-04 22:00 ` Bjorn Helgaas
0 siblings, 1 reply; 2+ messages in thread
From: Bartosz Golaszewski @ 2024-10-04 12:58 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci, linux-kernel, Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This driver doesn't need to use OF interfaces directly. Replace the
single usage of an of_ function and replace it with a generic device
property variant. Drop the of.h header and pull in property.h instead.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
Bjorn: This may conflict with [1] but this should go for v6.13 while [1]
is a fix that's targetting v6.12. If git doesn't figure it out then the
resolution is trivial, just add <linux/property.h> in both and drop
<linux/of.h>.
[1] https://lore.kernel.org/linux-pci/20241004125227.46514-1-brgl@bgdev.pl/
drivers/pci/pwrctl/pci-pwrctl-pwrseq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/pwrctl/pci-pwrctl-pwrseq.c b/drivers/pci/pwrctl/pci-pwrctl-pwrseq.c
index a23a4312574b..d3f960612cf3 100644
--- a/drivers/pci/pwrctl/pci-pwrctl-pwrseq.c
+++ b/drivers/pci/pwrctl/pci-pwrctl-pwrseq.c
@@ -6,9 +6,9 @@
#include <linux/device.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
-#include <linux/of.h>
#include <linux/pci-pwrctl.h>
#include <linux/platform_device.h>
+#include <linux/property.h>
#include <linux/pwrseq/consumer.h>
#include <linux/slab.h>
#include <linux/types.h>
@@ -35,7 +35,7 @@ static int pci_pwrctl_pwrseq_probe(struct platform_device *pdev)
if (!data)
return -ENOMEM;
- data->pwrseq = devm_pwrseq_get(dev, of_device_get_match_data(dev));
+ data->pwrseq = devm_pwrseq_get(dev, device_get_match_data(dev));
if (IS_ERR(data->pwrseq))
return dev_err_probe(dev, PTR_ERR(data->pwrseq),
"Failed to get the power sequencer\n");
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PCI/pwrctl: pwrseq: don't use OF-specific routines
2024-10-04 12:58 [PATCH] PCI/pwrctl: pwrseq: don't use OF-specific routines Bartosz Golaszewski
@ 2024-10-04 22:00 ` Bjorn Helgaas
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2024-10-04 22:00 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Bjorn Helgaas, linux-pci, linux-kernel, Bartosz Golaszewski
On Fri, Oct 04, 2024 at 02:58:21PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> This driver doesn't need to use OF interfaces directly. Replace the
> single usage of an of_ function and replace it with a generic device
> property variant. Drop the of.h header and pull in property.h instead.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Applied to pci/pwrseq for v6.13, thanks.
> ---
> Bjorn: This may conflict with [1] but this should go for v6.13 while [1]
> is a fix that's targetting v6.12. If git doesn't figure it out then the
> resolution is trivial, just add <linux/property.h> in both and drop
> <linux/of.h>.
>
> [1] https://lore.kernel.org/linux-pci/20241004125227.46514-1-brgl@bgdev.pl/
>
> drivers/pci/pwrctl/pci-pwrctl-pwrseq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/pwrctl/pci-pwrctl-pwrseq.c b/drivers/pci/pwrctl/pci-pwrctl-pwrseq.c
> index a23a4312574b..d3f960612cf3 100644
> --- a/drivers/pci/pwrctl/pci-pwrctl-pwrseq.c
> +++ b/drivers/pci/pwrctl/pci-pwrctl-pwrseq.c
> @@ -6,9 +6,9 @@
> #include <linux/device.h>
> #include <linux/mod_devicetable.h>
> #include <linux/module.h>
> -#include <linux/of.h>
> #include <linux/pci-pwrctl.h>
> #include <linux/platform_device.h>
> +#include <linux/property.h>
> #include <linux/pwrseq/consumer.h>
> #include <linux/slab.h>
> #include <linux/types.h>
> @@ -35,7 +35,7 @@ static int pci_pwrctl_pwrseq_probe(struct platform_device *pdev)
> if (!data)
> return -ENOMEM;
>
> - data->pwrseq = devm_pwrseq_get(dev, of_device_get_match_data(dev));
> + data->pwrseq = devm_pwrseq_get(dev, device_get_match_data(dev));
> if (IS_ERR(data->pwrseq))
> return dev_err_probe(dev, PTR_ERR(data->pwrseq),
> "Failed to get the power sequencer\n");
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-04 22:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-04 12:58 [PATCH] PCI/pwrctl: pwrseq: don't use OF-specific routines Bartosz Golaszewski
2024-10-04 22:00 ` Bjorn Helgaas
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).