Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755246AbYJAJAE (ORCPT ); Wed, 1 Oct 2008 05:00:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754498AbYJAI5Z (ORCPT ); Wed, 1 Oct 2008 04:57:25 -0400 Received: from mtagate4.de.ibm.com ([195.212.29.153]:50220 "EHLO mtagate4.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753206AbYJAI5N (ORCPT ); Wed, 1 Oct 2008 04:57:13 -0400 Message-Id: <20081001084127.513956461@de.ibm.com> References: <20081001083317.782967473@de.ibm.com> User-Agent: quilt/0.46-1 Date: Wed, 01 Oct 2008 10:33:26 +0200 From: Martin Schwidefsky To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Cc: Heiko Carstens , Carsten Otte , Kay Sievers , Cornelia Huck , Greg Kroah-Hartman , Martin Schwidefsky Subject: [patch 09/21] Use s390_root_dev_* in kvm_virtio. Content-Disposition: inline; filename=108-cio-busid4.diff Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2351 Lines: 82 From: Cornelia Huck 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 Cc: Kay Sievers Signed-off-by: Cornelia Huck Signed-off-by: Greg Kroah-Hartman Signed-off-by: Martin Schwidefsky --- drivers/s390/kvm/kvm_virtio.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) Index: quilt-2.6/drivers/s390/kvm/kvm_virtio.c =================================================================== --- quilt-2.6.orig/drivers/s390/kvm/kvm_virtio.c +++ quilt-2.6/drivers/s390/kvm/kvm_virtio.c @@ -24,6 +24,7 @@ #include #include #include +#include #define VIRTIO_SUBCODE_64 0x0D00 @@ -241,10 +242,7 @@ static struct virtio_config_ops kvm_vq_c * The root device for the kvm virtio devices. * This makes them appear as /sys/devices/kvm_s390/0,1,2 not /sys/devices/0,1,2. */ -static struct device kvm_root = { - .parent = NULL, - .bus_id = "kvm_s390", -}; +static struct device *kvm_root; /* * adds a new device and register it with virtio @@ -261,7 +259,7 @@ static void add_kvm_device(struct kvm_de return; } - kdev->vdev.dev.parent = &kvm_root; + kdev->vdev.dev.parent = kvm_root; kdev->vdev.id.device = d->type; kdev->vdev.config = &kvm_vq_configspace_ops; kdev->desc = d; @@ -317,15 +315,16 @@ static int __init kvm_devices_init(void) if (!MACHINE_IS_KVM) return -ENODEV; - rc = device_register(&kvm_root); - if (rc) { + kvm_root = s390_root_dev_register("kvm_s390"); + if (IS_ERR(kvm_root)) { + rc = PTR_ERR(kvm_root); printk(KERN_ERR "Could not register kvm_s390 root device"); return rc; } rc = vmem_add_mapping(PFN_PHYS(max_pfn), PAGE_SIZE); if (rc) { - device_unregister(&kvm_root); + s390_root_dev_unregister(kvm_root); return rc; } -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/