Skip to content

Commit 0314647

Browse files
zijun-hugregkh
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent c0fd973 commit 0314647

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

drivers/base/base.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void auxiliary_bus_init(void);
145145
static inline void auxiliary_bus_init(void) { }
146146
#endif
147147

148-
struct kobject *virtual_device_parent(struct device *dev);
148+
struct kobject *virtual_device_parent(void);
149149

150150
int bus_add_device(struct device *dev);
151151
void bus_probe_device(struct device *dev);

drivers/base/bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,7 @@ int subsys_virtual_register(const struct bus_type *subsys,
12961296
{
12971297
struct kobject *virtual_dir;
12981298

1299-
virtual_dir = virtual_device_parent(NULL);
1299+
virtual_dir = virtual_device_parent();
13001300
if (!virtual_dir)
13011301
return -ENOMEM;
13021302

drivers/base/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3171,7 +3171,7 @@ void device_initialize(struct device *dev)
31713171
}
31723172
EXPORT_SYMBOL_GPL(device_initialize);
31733173

3174-
struct kobject *virtual_device_parent(struct device *dev)
3174+
struct kobject *virtual_device_parent(void)
31753175
{
31763176
static struct kobject *virtual_dir = NULL;
31773177

@@ -3249,7 +3249,7 @@ static struct kobject *get_device_parent(struct device *dev,
32493249
* in a "glue" directory to prevent namespace collisions.
32503250
*/
32513251
if (parent == NULL)
3252-
parent_kobj = virtual_device_parent(dev);
3252+
parent_kobj = virtual_device_parent();
32533253
else if (parent->class && !dev->class->ns_type) {
32543254
subsys_put(sp);
32553255
return &parent->kobj;

0 commit comments

Comments
 (0)