From 50fe593b5d9cb52fc7bd009f303c245dfa0807ad Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Wed, 21 Mar 2012 15:08:38 +0100 Subject: [PATCH] --- yaml --- r: 295500 b: refs/heads/master c: b9136d207f0c05c96c6b9c980fa7f7fd541a65a8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/block/xen-blkfront.c | 3 +++ trunk/drivers/net/xen-netfront.c | 4 ++++ trunk/drivers/xen/platform-pci.c | 5 ----- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 50ba541c8a18..8cc7955c9eca 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 106b44388d8f76373149c4ea144f717b6d4d9a6d +refs/heads/master: b9136d207f0c05c96c6b9c980fa7f7fd541a65a8 diff --git a/trunk/drivers/block/xen-blkfront.c b/trunk/drivers/block/xen-blkfront.c index 9fd3ee203b1e..4276ab035e00 100644 --- a/trunk/drivers/block/xen-blkfront.c +++ b/trunk/drivers/block/xen-blkfront.c @@ -1452,6 +1452,9 @@ static int __init xlblk_init(void) if (!xen_domain()) return -ENODEV; + if (!xen_platform_pci_unplug) + return -ENODEV; + if (register_blkdev(XENVBD_MAJOR, DEV_NAME)) { printk(KERN_WARNING "xen_blk: can't get major %d with name %s\n", XENVBD_MAJOR, DEV_NAME); diff --git a/trunk/drivers/net/xen-netfront.c b/trunk/drivers/net/xen-netfront.c index fa679057630f..8cc0914b9f92 100644 --- a/trunk/drivers/net/xen-netfront.c +++ b/trunk/drivers/net/xen-netfront.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include @@ -1956,6 +1957,9 @@ static int __init netif_init(void) if (xen_initial_domain()) return 0; + if (!xen_platform_pci_unplug) + return -ENODEV; + printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n"); return xenbus_register_frontend(&netfront_driver); diff --git a/trunk/drivers/xen/platform-pci.c b/trunk/drivers/xen/platform-pci.c index 319dd0a94d51..2389e581e23c 100644 --- a/trunk/drivers/xen/platform-pci.c +++ b/trunk/drivers/xen/platform-pci.c @@ -186,11 +186,6 @@ static struct pci_driver platform_driver = { static int __init platform_pci_module_init(void) { - /* no unplug has been done, IGNORE hasn't been specified: just - * return now */ - if (!xen_platform_pci_unplug) - return -ENODEV; - return pci_register_driver(&platform_driver); }