Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[linux-2.6-block.git] / drivers / virtio / virtio.c
index f4080692b3513bd67a6d946c355c2cfbd7496ecd..f173587893cb34cadbfb4c6e548c158522c7749d 100644 (file)
@@ -353,7 +353,7 @@ static void virtio_dev_remove(struct device *_d)
        of_node_put(dev->dev.of_node);
 }
 
-static struct bus_type virtio_bus = {
+static const struct bus_type virtio_bus = {
        .name  = "virtio",
        .match = virtio_dev_match,
        .dev_groups = virtio_dev_groups,
@@ -510,8 +510,10 @@ int virtio_device_freeze(struct virtio_device *dev)
 
        if (drv && drv->freeze) {
                ret = drv->freeze(dev);
-               if (ret)
+               if (ret) {
+                       virtio_config_enable(dev);
                        return ret;
+               }
        }
 
        if (dev->config->destroy_avq)