diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2008-10-10 15:33:12 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-10-10 15:33:51 -0400 |
commit | 37f1c012f0f23b52df3a0d7850212b336fc9e595 (patch) | |
tree | c38c92fa5c1903ec051eb63b64c79f301987e030 | |
parent | b9d3aed7e1e50183085fcd2af643bf42d6b4bd95 (diff) |
[S390] Use s390_root_dev_* in kvm_virtio.
No need to define a static device for the kvm_s390 root device,
just use s390_root_dev_register().
This is needed for the bus_id rework
Acked-by: Carsten Otte <cotte@de.ibm.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | drivers/s390/kvm/kvm_virtio.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c index 292b60da6dc7..ff4a6931bb8e 100644 --- a/drivers/s390/kvm/kvm_virtio.c +++ b/drivers/s390/kvm/kvm_virtio.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <asm/kvm_virtio.h> | 24 | #include <asm/kvm_virtio.h> |
25 | #include <asm/setup.h> | 25 | #include <asm/setup.h> |
26 | #include <asm/s390_ext.h> | 26 | #include <asm/s390_ext.h> |
27 | #include <asm/s390_rdev.h> | ||
27 | 28 | ||
28 | #define VIRTIO_SUBCODE_64 0x0D00 | 29 | #define VIRTIO_SUBCODE_64 0x0D00 |
29 | 30 | ||
@@ -241,10 +242,7 @@ static struct virtio_config_ops kvm_vq_configspace_ops = { | |||
241 | * The root device for the kvm virtio devices. | 242 | * The root device for the kvm virtio devices. |
242 | * This makes them appear as /sys/devices/kvm_s390/0,1,2 not /sys/devices/0,1,2. | 243 | * This makes them appear as /sys/devices/kvm_s390/0,1,2 not /sys/devices/0,1,2. |
243 | */ | 244 | */ |
244 | static struct device kvm_root = { | 245 | static struct device *kvm_root; |
245 | .parent = NULL, | ||
246 | .bus_id = "kvm_s390", | ||
247 | }; | ||
248 | 246 | ||
249 | /* | 247 | /* |
250 | * adds a new device and register it with virtio | 248 | * adds a new device and register it with virtio |
@@ -261,7 +259,7 @@ static void add_kvm_device(struct kvm_device_desc *d, unsigned int offset) | |||
261 | return; | 259 | return; |
262 | } | 260 | } |
263 | 261 | ||
264 | kdev->vdev.dev.parent = &kvm_root; | 262 | kdev->vdev.dev.parent = kvm_root; |
265 | kdev->vdev.id.device = d->type; | 263 | kdev->vdev.id.device = d->type; |
266 | kdev->vdev.config = &kvm_vq_configspace_ops; | 264 | kdev->vdev.config = &kvm_vq_configspace_ops; |
267 | kdev->desc = d; | 265 | kdev->desc = d; |
@@ -317,15 +315,16 @@ static int __init kvm_devices_init(void) | |||
317 | if (!MACHINE_IS_KVM) | 315 | if (!MACHINE_IS_KVM) |
318 | return -ENODEV; | 316 | return -ENODEV; |
319 | 317 | ||
320 | rc = device_register(&kvm_root); | 318 | kvm_root = s390_root_dev_register("kvm_s390"); |
321 | if (rc) { | 319 | if (IS_ERR(kvm_root)) { |
320 | rc = PTR_ERR(kvm_root); | ||
322 | printk(KERN_ERR "Could not register kvm_s390 root device"); | 321 | printk(KERN_ERR "Could not register kvm_s390 root device"); |
323 | return rc; | 322 | return rc; |
324 | } | 323 | } |
325 | 324 | ||
326 | rc = vmem_add_mapping(PFN_PHYS(max_pfn), PAGE_SIZE); | 325 | rc = vmem_add_mapping(PFN_PHYS(max_pfn), PAGE_SIZE); |
327 | if (rc) { | 326 | if (rc) { |
328 | device_unregister(&kvm_root); | 327 | s390_root_dev_unregister(kvm_root); |
329 | return rc; | 328 | return rc; |
330 | } | 329 | } |
331 | 330 | ||