]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/virtio/virtio_balloon.c
Merge branch 'for_rmk' of git://git.mnementh.co.uk/linux-2.6-im
[linux-2.6-omap-h63xx.git] / drivers / virtio / virtio_balloon.c
index fef88d84cef6efc0f6519fd4c5e93a128dc667cc..62eab43152d21314826838080caed9ad3ee3eb1e 100644 (file)
@@ -158,7 +158,7 @@ static inline s64 towards_target(struct virtio_balloon *vb)
        vb->vdev->config->get(vb->vdev,
                              offsetof(struct virtio_balloon_config, num_pages),
                              &v, sizeof(v));
-       return v - vb->num_pages;
+       return (s64)v - vb->num_pages;
 }
 
 static void update_balloon_size(struct virtio_balloon *vb)
@@ -227,7 +227,7 @@ static int virtballoon_probe(struct virtio_device *vdev)
        }
 
        vb->tell_host_first
-               = vdev->config->feature(vdev, VIRTIO_BALLOON_F_MUST_TELL_HOST);
+               = virtio_has_feature(vdev, VIRTIO_BALLOON_F_MUST_TELL_HOST);
 
        return 0;
 
@@ -259,7 +259,11 @@ static void virtballoon_remove(struct virtio_device *vdev)
        kfree(vb);
 }
 
+static unsigned int features[] = { VIRTIO_BALLOON_F_MUST_TELL_HOST };
+
 static struct virtio_driver virtio_balloon = {
+       .feature_table = features,
+       .feature_table_size = ARRAY_SIZE(features),
        .driver.name =  KBUILD_MODNAME,
        .driver.owner = THIS_MODULE,
        .id_table =     id_table,