diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-26 17:49:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-26 17:49:12 -0500 |
commit | 3c834b6f41fa21a48389b13c3bf63aa8df1d7080 (patch) | |
tree | 126447276497510f44277e8442715e103e2cb85a /include | |
parent | 515d01f7726b9ba4838787d247115e1b259e1cc7 (diff) | |
parent | 8078db789a92b10ff6e2d713231b5367e014c53b (diff) |
Merge tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux
Pull virtio updates from Rusty Russell:
"All trivial, thanks to the stuff which didn't quite make it time"
* tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
virtio_console: Initialize guest_connected=true for rproc_serial
virtio: use module_virtio_driver.
virtio: Add module driver macro for virtio drivers.
virtio_console: Use virtio device index to generate port name
virtio: make pci_device_id const
virtio: make config_ops const
virtio-mmio: fix wrong comment about register offset
virtio_console: Let unconnected rproc device receive data.
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/virtio.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h index cf8adb1f5b2c..ff6714e6d0f5 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h | |||
@@ -78,7 +78,7 @@ struct virtio_device { | |||
78 | int index; | 78 | int index; |
79 | struct device dev; | 79 | struct device dev; |
80 | struct virtio_device_id id; | 80 | struct virtio_device_id id; |
81 | struct virtio_config_ops *config; | 81 | const struct virtio_config_ops *config; |
82 | struct list_head vqs; | 82 | struct list_head vqs; |
83 | /* Note that this is a Linux set_bit-style bitmap. */ | 83 | /* Note that this is a Linux set_bit-style bitmap. */ |
84 | unsigned long features[1]; | 84 | unsigned long features[1]; |
@@ -126,4 +126,13 @@ static inline struct virtio_driver *drv_to_virtio(struct device_driver *drv) | |||
126 | 126 | ||
127 | int register_virtio_driver(struct virtio_driver *drv); | 127 | int register_virtio_driver(struct virtio_driver *drv); |
128 | void unregister_virtio_driver(struct virtio_driver *drv); | 128 | void unregister_virtio_driver(struct virtio_driver *drv); |
129 | |||
130 | /* module_virtio_driver() - Helper macro for drivers that don't do | ||
131 | * anything special in module init/exit. This eliminates a lot of | ||
132 | * boilerplate. Each module may only use this macro once, and | ||
133 | * calling it replaces module_init() and module_exit() | ||
134 | */ | ||
135 | #define module_virtio_driver(__virtio_driver) \ | ||
136 | module_driver(__virtio_driver, register_virtio_driver, \ | ||
137 | unregister_virtio_driver) | ||
129 | #endif /* _LINUX_VIRTIO_H */ | 138 | #endif /* _LINUX_VIRTIO_H */ |