]> Pileus Git - ~andy/linux/blobdiff - drivers/s390/kvm/kvm_virtio.c
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
[~andy/linux] / drivers / s390 / kvm / kvm_virtio.c
index aec60d55b10dc238e5b3529507fe9afc43db173e..94f49ffa70ba22e5e27508c93d139a2b85983ab2 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/virtio_console.h>
 #include <linux/interrupt.h>
 #include <linux/virtio_ring.h>
+#include <linux/export.h>
 #include <linux/pfn.h>
 #include <asm/io.h>
 #include <asm/kvm_para.h>
@@ -33,7 +34,7 @@
  * The pointer to our (page) of device descriptions.
  */
 static void *kvm_devices;
-struct work_struct hotplug_work;
+static struct work_struct hotplug_work;
 
 struct kvm_device {
        struct virtio_device vdev;
@@ -334,10 +335,10 @@ static void scan_devices(void)
  */
 static int match_desc(struct device *dev, void *data)
 {
-       if ((ulong)to_kvmdev(dev_to_virtio(dev))->desc == (ulong)data)
-               return 1;
+       struct virtio_device *vdev = dev_to_virtio(dev);
+       struct kvm_device *kdev = to_kvmdev(vdev);
 
-       return 0;
+       return kdev->desc == data;
 }
 
 /*