summaryrefslogtreecommitdiffstats
path: root/drivers/base/core.c
diff options
context:
space:
mode:
authorZijun Hu <quic_zijuhu@quicinc.com>2024-07-25 23:40:55 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-07-31 14:55:13 +0200
commit0314647dec70bf0e856303dc70d00e9f1ba568ba (patch)
treeca8cb1931c69ddad86c1eb302b074307c1938dcf /drivers/base/core.c
parentc0fd973c108cdc22a384854bc4b3e288a9717bb2 (diff)
downloadlinux-stable-0314647dec70bf0e856303dc70d00e9f1ba568ba.tar.gz
linux-stable-0314647dec70bf0e856303dc70d00e9f1ba568ba.tar.bz2
linux-stable-0314647dec70bf0e856303dc70d00e9f1ba568ba.zip
driver core: Remove unused parameter for virtual_device_parent()
Function struct kobject *virtual_device_parent(struct device *dev) does not use its parameter @dev, and the kobject returned also has nothing deal with specific device, so remove the unused parameter. Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20240725-virtual_kobj_fix-v1-1-36335cae4544@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 72798133ed63..1688e76cb64b 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -3171,7 +3171,7 @@ void device_initialize(struct device *dev)
}
EXPORT_SYMBOL_GPL(device_initialize);
-struct kobject *virtual_device_parent(struct device *dev)
+struct kobject *virtual_device_parent(void)
{
static struct kobject *virtual_dir = NULL;
@@ -3249,7 +3249,7 @@ static struct kobject *get_device_parent(struct device *dev,
* in a "glue" directory to prevent namespace collisions.
*/
if (parent == NULL)
- parent_kobj = virtual_device_parent(dev);
+ parent_kobj = virtual_device_parent();
else if (parent->class && !dev->class->ns_type) {
subsys_put(sp);
return &parent->kobj;