driver core: platform: Remove platform_device_add_properties()
cover driver core: platform: Remove platform_device_add_properties()
Hi,
It looks like there is only one place left that still uses the function. Converting that last user and removing the thing.
Note, I'm actually resending the patch for board-paz00.c. I'm assuming the original patch slipped through the cracks because it did not end up anywhere.
I would imagine that it's OK to everybody if Greg takes these?
thanks,
Heikki Krogerus (2):
ARM: tegra: paz00: Handle device properties with software node API driver core: platform: Remove platform_device_add_properties()
arch/arm/mach-tegra/board-paz00.c | 2 +- drivers/base/platform.c | 20 ++------------------ include/linux/platform_device.h | 2 -- 3 files changed, 3 insertions(+), 21 deletions(-)
Signature · 1 line
2.30.2
PATCH 1/2 ARM: tegra: paz00: Handle device properties with software node API
The old device property API is going to be removed. Replacing the device_add_properties() call with the software node API equivalent, device_create_managed_software_node().
--- arch/arm/mach-tegra/board-paz00.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-tegra/board-paz00.c +1 -1
@@ -36,7 +36,7 @@ static struct gpiod_lookup_table wifi_gpio_lookup = {void __init tegra_paz00_wifikill_init (void ) { -platform_device_add_properties (&wifi_rfkill_device, wifi_rfkill_prop); +device_create_managed_software_node (&wifi_rfkill_device.dev, wifi_rfkill_prop,NULL );gpiod_add_lookup_table (&wifi_gpio_lookup);platform_device_register (&wifi_rfkill_device); }
Signature · 1 line
2.30.2
PATCH 2/2 driver core: platform: Remove platform_device_add_properties()
In reply to Heikki KrogerusThere are no more users for it. The last place where it's called is in platform_device_register_full(). Replacing that call with device_create_managed_software_node() and removing the function.
--- drivers/base/platform.c | 20 ++------------------ include/linux/platform_device.h | 2 -- 2 files changed, 2 insertions(+), 20 deletions(-)
drivers/base/platform.c +2 -18
@@ -661,22 +661,6 @@ int platform_device_add_data(struct platform_device *pdev, const void *data, }EXPORT_SYMBOL_GPL (platform_device_add_data); -/** -* platform_device_add_properties - add built-in properties to a platform device -* @pdev: platform device to add properties to -* @properties: null terminated array of properties to add -* -* The function will take deep copy of @properties and attach the copy to the -* platform device. The memory associated with properties will be freed when the -* platform device is released. -*/ -int platform_device_add_properties (struct platform_device *pdev, -const struct property_entry *properties) -{ -return device_add_properties (&pdev->dev, properties); -} -EXPORT_SYMBOL_GPL (platform_device_add_properties); -/** * platform_device_add - add a platform device to device hierarchy * @pdev: platform device we're adding
@@ -862,8 +846,8 @@ struct platform_device *platform_device_register_full( goto err;if (pdevinfo->properties) { - ret =platform_device_add_properties (pdev, - pdevinfo->properties); + ret =device_create_managed_software_node (&pdev->dev, + pdevinfo->properties,NULL );if (ret) goto err; }
include/linux/platform_device.h +0 -2
@@ -200,8 +200,6 @@ extern int platform_device_add_resources(struct platform_device *pdev, unsigned int num);extern int platform_device_add_data (struct platform_device *pdev,const void *data,size_t size); -extern int platform_device_add_properties (struct platform_device *pdev, -const struct property_entry *properties);extern int platform_device_add (struct platform_device *pdev);extern void platform_device_del (struct platform_device *pdev);extern void platform_device_put (struct platform_device *pdev);
Signature · 1 line
2.30.2
Quoted 8 lines · Heikki Krogerus
Hi,
It looks like there is only one place left that still uses the function. Converting that last user and removing the thing.
Note, I'm actually resending the patch for
board-paz00.c. I'm assuming the original patch slipped through the cracks because it did not end up anywhere.
Cool!
Btw, which base have you used for this series?
Quoted 16 lines
I would imagine that it's OK to everybody if Greg takes these?
thanks,
Heikki Krogerus (2):
ARM: tegra: paz00: Handle device properties with software node API driver core: platform: Removeplatform_device_add_properties()arch/arm/mach-tegra/board-paz00.c | 2 +- drivers/base/platform.c | 20 ++------------------ include/linux/platform_device.h | 2 -- 3 files changed, 3 insertions(+), 21 deletions(-)Signature · 1 line
2.30.2
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 6 lines · Andy Shevchenko
Quoted 5 lines · Heikki Krogerus
Hi,
It looks like there is only one place left that still uses the function. Converting that last user and removing the thing.
Quoted 8 lines
Quoted 3 lines
Note, I'm actually resending the patch for
board-paz00.c. I'm assuming the original patch slipped through the cracks because it did not end up anywhere.Cool!
Reviewed-by Andy Shevchenko <[email protected]>Btw, which base have you used for this series?
intel-next for this one.
Signature · 1 line
heikki
Quoted 11 lines · Heikki Krogerus
Quoted 10 lines · Andy Shevchenko
Quoted 8 lines · Heikki Krogerus
Hi,
It looks like there is only one place left that still uses the function. Converting that last user and removing the thing.
Note, I'm actually resending the patch for
board-paz00.c. I'm assuming the original patch slipped through the cracks because it did not end up anywhere.
Quoted 6 lines
Quoted 4 lines
Cool!
Reviewed-by Andy Shevchenko <[email protected]>Btw, which base have you used for this series?
intel-next for this one.
I mean linux-next :-)
Signature · 1 line
heikki
Quoted 12 lines · Heikki Krogerus
Quoted 11 lines · Heikki Krogerus
Quoted 10 lines · Andy Shevchenko
Quoted 8 lines · Heikki Krogerus
Hi,
It looks like there is only one place left that still uses the function. Converting that last user and removing the thing.
Note, I'm actually resending the patch for
board-paz00.c. I'm assuming the original patch slipped through the cracks because it did not end up anywhere.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Cool!
Reviewed-by Andy Shevchenko <[email protected]>Btw, which base have you used for this series?
intel-next for this one.
I mean linux-next :-)
Let's wait for CIs to respond. I have a feeling that the first patch is good for v5.14, while the second one is probably for the next cycle.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Greg Kroah-Hartman
maintainerQuoted 16 lines · Andy Shevchenko
Quoted 15 lines · Heikki Krogerus
Quoted 14 lines · Heikki Krogerus
Quoted 13 lines · Andy Shevchenko
Quoted 8 lines · Heikki Krogerus
Hi,
It looks like there is only one place left that still uses the function. Converting that last user and removing the thing.
Note, I'm actually resending the patch for
board-paz00.c. I'm assuming the original patch slipped through the cracks because it did not end up anywhere.Cool!
Reviewed-by Andy Shevchenko <[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Btw, which base have you used for this series?
intel-next for this one.
I mean linux-next :-)
Let's wait for CIs to respond. I have a feeling that the first patch is good for v5.14, while the second one is probably for the next cycle.
Why? I can take both now, no problem...
Rafael J. Wysocki
maintainerQuoted 20 lines · Greg Kroah-Hartman
Quoted 18 lines · Andy Shevchenko
Quoted 17 lines · Heikki Krogerus
Quoted 16 lines · Heikki Krogerus
Quoted 14 lines · Andy Shevchenko
Quoted 8 lines · Heikki Krogerus
Hi,
It looks like there is only one place left that still uses the function. Converting that last user and removing the thing.
Note, I'm actually resending the patch for
board-paz00.c. I'm assuming the original patch slipped through the cracks because it did not end up anywhere.Cool!
Reviewed-by Andy Shevchenko <[email protected]>Btw, which base have you used for this series?
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
intel-next for this one.
I mean linux-next :-)
Let's wait for CIs to respond. I have a feeling that the first patch is good for v5.14, while the second one is probably for the next cycle.
Why? I can take both now, no problem...
Not really, there are dependencies, one in my tree ATM.
It's better if I take them IMHO.
Quoted 26 lines · Rafael J. Wysocki
Quoted 24 lines · Greg Kroah-Hartman
Quoted 22 lines · Andy Shevchenko
Quoted 20 lines · Heikki Krogerus
Quoted 11 lines · Heikki Krogerus
Quoted 10 lines · Andy Shevchenko
Quoted 8 lines · Heikki Krogerus
Hi,
It looks like there is only one place left that still uses the function. Converting that last user and removing the thing.
Note, I'm actually resending the patch for
board-paz00.c. I'm assuming the original patch slipped through the cracks because it did not end up anywhere.Quoted 6 lines
Quoted 4 lines
Cool!
Reviewed-by Andy Shevchenko <[email protected]>Btw, which base have you used for this series?
intel-next for this one.
I mean linux-next :-)
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Let's wait for CIs to respond. I have a feeling that the first patch is good for v5.14, while the second one is probably for the next cycle.
Why? I can take both now, no problem...
Not really, there are dependencies, one in my tree ATM.
It's better if I take them IMHO.
Sure, feel free to: