summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/virtio.h3
-rw-r--r--include/linux/virtio_config.h6
2 files changed, 4 insertions, 5 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index 65261a7..7828a7f 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -101,8 +101,7 @@ struct virtio_device {
const struct virtio_config_ops *config;
const struct vringh_config_ops *vringh_config;
struct list_head vqs;
- /* Note that this is a Linux set_bit-style bitmap. */
- unsigned long features[1];
+ u32 features;
void *priv;
};
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index d8e28a2..ffc2ae0 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -92,7 +92,7 @@ static inline bool __virtio_test_bit(const struct virtio_device *vdev,
else
BUG_ON(fbit >= 32);
- return test_bit(fbit, vdev->features);
+ return vdev->features & BIT(fbit);
}
/**
@@ -109,7 +109,7 @@ static inline void __virtio_set_bit(struct virtio_device *vdev,
else
BUG_ON(fbit >= 32);
- set_bit(fbit, vdev->features);
+ vdev->features |= BIT(fbit);
}
/**
@@ -126,7 +126,7 @@ static inline void __virtio_clear_bit(struct virtio_device *vdev,
else
BUG_ON(fbit >= 32);
- clear_bit(fbit, vdev->features);
+ vdev->features &= ~BIT(fbit);
}
/**
OpenPOWER on IntegriCloud