PCI/pwrctl: pwrseq: don't use OF-specific routines
PATCH 1/1 PCI/pwrctl: pwrseq: don't use OF-specific routines
From: Bartosz Golaszewski <[email protected]>
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.
---
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/[email protected]/
drivers/pci/pwrctl/pci-pwrctl-pwrseq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/pwrctl/pci-pwrctl-pwrseq.c +2 -2
@@ -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" );
Signature · 1 line
2.43.0
Bjorn Helgaas
AppliedQuoted 7 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
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 theof.hheader and pull inproperty.hinstead.Signed-off-by Bartosz Golaszewski <[email protected]>
Applied to pci/pwrseq for v6.13, thanks.
Quoted 38 lines
---
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/[email protected]/
drivers/pci/pwrctl/pci-pwrctl-pwrseq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/pci/pwrctl/pci-pwrctl-pwrseq.c +2
-2@@ -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" );Signature · 1 line
2.43.0