summaryrefslogtreecommitdiff
path: root/include/linux/virtio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/virtio.h')
-rw-r--r--include/linux/virtio.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index 4b8f17d90458..5f1f80c76468 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -85,7 +85,11 @@ struct virtio_device {
void *priv;
};
-#define dev_to_virtio(dev) container_of(dev, struct virtio_device, dev)
+static inline struct virtio_device *dev_to_virtio(struct device *_dev)
+{
+ return container_of(_dev, struct virtio_device, dev);
+}
+
int register_virtio_device(struct virtio_device *dev);
void unregister_virtio_device(struct virtio_device *dev);