* [PATCH 0/2] driver core: platform: Remove platform_device_add_properties() @ 2021-05-18 8:30 Heikki Krogerus 2021-05-18 8:30 ` [PATCH 1/2] ARM: tegra: paz00: Handle device properties with software node API Heikki Krogerus ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: Heikki Krogerus @ 2021-05-18 8:30 UTC (permalink / raw) To: Greg Kroah-Hartman, Thierry Reding, Jonathan Hunter Cc: Rafael J. Wysocki, Andy Shevchenko, linux-kernel 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(-) -- 2.30.2 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] ARM: tegra: paz00: Handle device properties with software node API 2021-05-18 8:30 [PATCH 0/2] driver core: platform: Remove platform_device_add_properties() Heikki Krogerus @ 2021-05-18 8:30 ` Heikki Krogerus 2021-05-18 8:30 ` [PATCH 2/2] driver core: platform: Remove platform_device_add_properties() Heikki Krogerus 2021-05-18 8:59 ` [PATCH 0/2] " Andy Shevchenko 2 siblings, 0 replies; 10+ messages in thread From: Heikki Krogerus @ 2021-05-18 8:30 UTC (permalink / raw) To: Greg Kroah-Hartman, Thierry Reding, Jonathan Hunter Cc: Rafael J. Wysocki, Andy Shevchenko, linux-kernel 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(). Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Jonathan Hunter <jonathanh@nvidia.com> --- arch/arm/mach-tegra/board-paz00.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c index b5c990a7a5af5..18d37f90cdfe3 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c @@ -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); } -- 2.30.2 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/2] driver core: platform: Remove platform_device_add_properties() 2021-05-18 8:30 [PATCH 0/2] driver core: platform: Remove platform_device_add_properties() Heikki Krogerus 2021-05-18 8:30 ` [PATCH 1/2] ARM: tegra: paz00: Handle device properties with software node API Heikki Krogerus @ 2021-05-18 8:30 ` Heikki Krogerus 2021-05-18 8:59 ` [PATCH 0/2] " Andy Shevchenko 2 siblings, 0 replies; 10+ messages in thread From: Heikki Krogerus @ 2021-05-18 8:30 UTC (permalink / raw) To: Greg Kroah-Hartman, Thierry Reding, Jonathan Hunter Cc: Rafael J. Wysocki, Andy Shevchenko, linux-kernel There 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. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> --- drivers/base/platform.c | 20 ++------------------ include/linux/platform_device.h | 2 -- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 9cd34def2237b..0299b03e64d40 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -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; } diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index cd81e060863c9..a05eb819f306a 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h @@ -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); -- 2.30.2 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] driver core: platform: Remove platform_device_add_properties() 2021-05-18 8:30 [PATCH 0/2] driver core: platform: Remove platform_device_add_properties() Heikki Krogerus 2021-05-18 8:30 ` [PATCH 1/2] ARM: tegra: paz00: Handle device properties with software node API Heikki Krogerus 2021-05-18 8:30 ` [PATCH 2/2] driver core: platform: Remove platform_device_add_properties() Heikki Krogerus @ 2021-05-18 8:59 ` Andy Shevchenko 2021-05-18 11:21 ` Heikki Krogerus 2 siblings, 1 reply; 10+ messages in thread From: Andy Shevchenko @ 2021-05-18 8:59 UTC (permalink / raw) To: Heikki Krogerus Cc: Greg Kroah-Hartman, Thierry Reding, Jonathan Hunter, Rafael J. Wysocki, linux-kernel On Tue, May 18, 2021 at 11:30:44AM +0300, Heikki Krogerus wrote: > 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 <andriy.shevchenko@linux.intel.com> Btw, which base have you used for this series? > 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(-) > > -- > 2.30.2 > -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] driver core: platform: Remove platform_device_add_properties() 2021-05-18 8:59 ` [PATCH 0/2] " Andy Shevchenko @ 2021-05-18 11:21 ` Heikki Krogerus 2021-05-18 11:30 ` Heikki Krogerus 0 siblings, 1 reply; 10+ messages in thread From: Heikki Krogerus @ 2021-05-18 11:21 UTC (permalink / raw) To: Andy Shevchenko Cc: Greg Kroah-Hartman, Thierry Reding, Jonathan Hunter, Rafael J. Wysocki, linux-kernel On Tue, May 18, 2021 at 11:59:22AM +0300, Andy Shevchenko wrote: > On Tue, May 18, 2021 at 11:30:44AM +0300, Heikki Krogerus wrote: > > 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 <andriy.shevchenko@linux.intel.com> > > Btw, which base have you used for this series? intel-next for this one. -- heikki ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] driver core: platform: Remove platform_device_add_properties() 2021-05-18 11:21 ` Heikki Krogerus @ 2021-05-18 11:30 ` Heikki Krogerus 2021-05-18 11:48 ` Andy Shevchenko 0 siblings, 1 reply; 10+ messages in thread From: Heikki Krogerus @ 2021-05-18 11:30 UTC (permalink / raw) To: Andy Shevchenko Cc: Greg Kroah-Hartman, Thierry Reding, Jonathan Hunter, Rafael J. Wysocki, linux-kernel On Tue, May 18, 2021 at 02:21:46PM +0300, Heikki Krogerus wrote: > On Tue, May 18, 2021 at 11:59:22AM +0300, Andy Shevchenko wrote: > > On Tue, May 18, 2021 at 11:30:44AM +0300, Heikki Krogerus wrote: > > > 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 <andriy.shevchenko@linux.intel.com> > > > > Btw, which base have you used for this series? > > intel-next for this one. I mean linux-next :-) -- heikki ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] driver core: platform: Remove platform_device_add_properties() 2021-05-18 11:30 ` Heikki Krogerus @ 2021-05-18 11:48 ` Andy Shevchenko 2021-05-18 12:40 ` Greg Kroah-Hartman 0 siblings, 1 reply; 10+ messages in thread From: Andy Shevchenko @ 2021-05-18 11:48 UTC (permalink / raw) To: Heikki Krogerus Cc: Greg Kroah-Hartman, Thierry Reding, Jonathan Hunter, Rafael J. Wysocki, linux-kernel On Tue, May 18, 2021 at 02:30:57PM +0300, Heikki Krogerus wrote: > On Tue, May 18, 2021 at 02:21:46PM +0300, Heikki Krogerus wrote: > > On Tue, May 18, 2021 at 11:59:22AM +0300, Andy Shevchenko wrote: > > > On Tue, May 18, 2021 at 11:30:44AM +0300, Heikki Krogerus wrote: > > > > 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 <andriy.shevchenko@linux.intel.com> > > > > > > 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. -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] driver core: platform: Remove platform_device_add_properties() 2021-05-18 11:48 ` Andy Shevchenko @ 2021-05-18 12:40 ` Greg Kroah-Hartman 2021-05-18 12:53 ` Rafael J. Wysocki 0 siblings, 1 reply; 10+ messages in thread From: Greg Kroah-Hartman @ 2021-05-18 12:40 UTC (permalink / raw) To: Andy Shevchenko Cc: Heikki Krogerus, Thierry Reding, Jonathan Hunter, Rafael J. Wysocki, linux-kernel On Tue, May 18, 2021 at 02:48:37PM +0300, Andy Shevchenko wrote: > On Tue, May 18, 2021 at 02:30:57PM +0300, Heikki Krogerus wrote: > > On Tue, May 18, 2021 at 02:21:46PM +0300, Heikki Krogerus wrote: > > > On Tue, May 18, 2021 at 11:59:22AM +0300, Andy Shevchenko wrote: > > > > On Tue, May 18, 2021 at 11:30:44AM +0300, Heikki Krogerus wrote: > > > > > 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 <andriy.shevchenko@linux.intel.com> > > > > > > > > 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... ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] driver core: platform: Remove platform_device_add_properties() 2021-05-18 12:40 ` Greg Kroah-Hartman @ 2021-05-18 12:53 ` Rafael J. Wysocki 2021-05-18 15:26 ` Greg Kroah-Hartman 0 siblings, 1 reply; 10+ messages in thread From: Rafael J. Wysocki @ 2021-05-18 12:53 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Andy Shevchenko, Heikki Krogerus, Thierry Reding, Jonathan Hunter, Rafael J. Wysocki, Linux Kernel Mailing List On Tue, May 18, 2021 at 2:40 PM Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote: > > On Tue, May 18, 2021 at 02:48:37PM +0300, Andy Shevchenko wrote: > > On Tue, May 18, 2021 at 02:30:57PM +0300, Heikki Krogerus wrote: > > > On Tue, May 18, 2021 at 02:21:46PM +0300, Heikki Krogerus wrote: > > > > On Tue, May 18, 2021 at 11:59:22AM +0300, Andy Shevchenko wrote: > > > > > On Tue, May 18, 2021 at 11:30:44AM +0300, Heikki Krogerus wrote: > > > > > > 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 <andriy.shevchenko@linux.intel.com> > > > > > > > > > > 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... Not really, there are dependencies, one in my tree ATM. It's better if I take them IMHO. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] driver core: platform: Remove platform_device_add_properties() 2021-05-18 12:53 ` Rafael J. Wysocki @ 2021-05-18 15:26 ` Greg Kroah-Hartman 0 siblings, 0 replies; 10+ messages in thread From: Greg Kroah-Hartman @ 2021-05-18 15:26 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Andy Shevchenko, Heikki Krogerus, Thierry Reding, Jonathan Hunter, Linux Kernel Mailing List On Tue, May 18, 2021 at 02:53:09PM +0200, Rafael J. Wysocki wrote: > On Tue, May 18, 2021 at 2:40 PM Greg Kroah-Hartman > <gregkh@linuxfoundation.org> wrote: > > > > On Tue, May 18, 2021 at 02:48:37PM +0300, Andy Shevchenko wrote: > > > On Tue, May 18, 2021 at 02:30:57PM +0300, Heikki Krogerus wrote: > > > > On Tue, May 18, 2021 at 02:21:46PM +0300, Heikki Krogerus wrote: > > > > > On Tue, May 18, 2021 at 11:59:22AM +0300, Andy Shevchenko wrote: > > > > > > On Tue, May 18, 2021 at 11:30:44AM +0300, Heikki Krogerus wrote: > > > > > > > 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 <andriy.shevchenko@linux.intel.com> > > > > > > > > > > > > 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... > > Not really, there are dependencies, one in my tree ATM. > > It's better if I take them IMHO. Sure, feel free to: Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-05-18 15:26 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-05-18 8:30 [PATCH 0/2] driver core: platform: Remove platform_device_add_properties() Heikki Krogerus 2021-05-18 8:30 ` [PATCH 1/2] ARM: tegra: paz00: Handle device properties with software node API Heikki Krogerus 2021-05-18 8:30 ` [PATCH 2/2] driver core: platform: Remove platform_device_add_properties() Heikki Krogerus 2021-05-18 8:59 ` [PATCH 0/2] " Andy Shevchenko 2021-05-18 11:21 ` Heikki Krogerus 2021-05-18 11:30 ` Heikki Krogerus 2021-05-18 11:48 ` Andy Shevchenko 2021-05-18 12:40 ` Greg Kroah-Hartman 2021-05-18 12:53 ` Rafael J. Wysocki 2021-05-18 15:26 ` Greg Kroah-Hartman
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).