diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/vio.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index 19a5656001c0..f0bad7070fb5 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c | |||
@@ -37,8 +37,6 @@ | |||
37 | #include <asm/iseries/hv_call_xm.h> | 37 | #include <asm/iseries/hv_call_xm.h> |
38 | #include <asm/iseries/iommu.h> | 38 | #include <asm/iseries/iommu.h> |
39 | 39 | ||
40 | extern struct kset devices_subsys; /* needed for vio_find_name() */ | ||
41 | |||
42 | static struct bus_type vio_bus_type; | 40 | static struct bus_type vio_bus_type; |
43 | 41 | ||
44 | static struct vio_dev vio_bus_device = { /* fake "parent" device */ | 42 | static struct vio_dev vio_bus_device = { /* fake "parent" device */ |
@@ -361,19 +359,16 @@ EXPORT_SYMBOL(vio_get_attribute); | |||
361 | #ifdef CONFIG_PPC_PSERIES | 359 | #ifdef CONFIG_PPC_PSERIES |
362 | /* vio_find_name() - internal because only vio.c knows how we formatted the | 360 | /* vio_find_name() - internal because only vio.c knows how we formatted the |
363 | * kobject name | 361 | * kobject name |
364 | * XXX once vio_bus_type.devices is actually used as a kset in | ||
365 | * drivers/base/bus.c, this function should be removed in favor of | ||
366 | * "device_find(kobj_name, &vio_bus_type)" | ||
367 | */ | 362 | */ |
368 | static struct vio_dev *vio_find_name(const char *kobj_name) | 363 | static struct vio_dev *vio_find_name(const char *name) |
369 | { | 364 | { |
370 | struct kobject *found; | 365 | struct device *found; |
371 | 366 | ||
372 | found = kset_find_obj(&devices_subsys, kobj_name); | 367 | found = bus_find_device_by_name(&vio_bus_type, NULL, name); |
373 | if (!found) | 368 | if (!found) |
374 | return NULL; | 369 | return NULL; |
375 | 370 | ||
376 | return to_vio_dev(container_of(found, struct device, kobj)); | 371 | return to_vio_dev(found); |
377 | } | 372 | } |
378 | 373 | ||
379 | /** | 374 | /** |