LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH RESEND 2/2] driver core: platform: Remove platform_device_add_properties()
Date: Tue, 17 Aug 2021 13:24:49 +0300 [thread overview]
Message-ID: <20210817102449.39994-3-heikki.krogerus@linux.intel.com> (raw)
In-Reply-To: <20210817102449.39994-1-heikki.krogerus@linux.intel.com>
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.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
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 a94b7f4548814..652531f67135a 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -641,22 +641,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
@@ -842,8 +826,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 ed42ea9f60ba0..7c96f169d2740 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -197,8 +197,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
next prev parent reply other threads:[~2021-08-17 10:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-17 10:24 [PATCH RESEND 0/2] " Heikki Krogerus
2021-08-17 10:24 ` [PATCH RESEND 1/2] ARM: tegra: paz00: Handle device properties with software node API Heikki Krogerus
2021-08-17 14:30 ` Thierry Reding
2021-08-18 10:57 ` Greg Kroah-Hartman
2021-08-17 10:24 ` Heikki Krogerus [this message]
2021-08-17 14:32 ` [PATCH RESEND 2/2] driver core: platform: Remove platform_device_add_properties() Thierry Reding
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=20210817102449.39994-3-heikki.krogerus@linux.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=thierry.reding@gmail.com \
--subject='Re: [PATCH RESEND 2/2] driver core: platform: Remove platform_device_add_properties()' \
/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
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).