diff options
Diffstat (limited to 'drivers/virtio')
-rw-r--r-- | drivers/virtio/virtio.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 7084e7e146c0..fc85cba64578 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c | |||
@@ -71,13 +71,6 @@ static int virtio_uevent(struct device *_dv, struct kobj_uevent_env *env) | |||
71 | dev->id.device, dev->id.vendor); | 71 | dev->id.device, dev->id.vendor); |
72 | } | 72 | } |
73 | 73 | ||
74 | static struct bus_type virtio_bus = { | ||
75 | .name = "virtio", | ||
76 | .match = virtio_dev_match, | ||
77 | .dev_attrs = virtio_dev_attrs, | ||
78 | .uevent = virtio_uevent, | ||
79 | }; | ||
80 | |||
81 | static void add_status(struct virtio_device *dev, unsigned status) | 74 | static void add_status(struct virtio_device *dev, unsigned status) |
82 | { | 75 | { |
83 | dev->config->set_status(dev, dev->config->get_status(dev) | status); | 76 | dev->config->set_status(dev, dev->config->get_status(dev) | status); |
@@ -147,13 +140,20 @@ static int virtio_dev_remove(struct device *_d) | |||
147 | return 0; | 140 | return 0; |
148 | } | 141 | } |
149 | 142 | ||
143 | static struct bus_type virtio_bus = { | ||
144 | .name = "virtio", | ||
145 | .match = virtio_dev_match, | ||
146 | .dev_attrs = virtio_dev_attrs, | ||
147 | .uevent = virtio_uevent, | ||
148 | .probe = virtio_dev_probe, | ||
149 | .remove = virtio_dev_remove, | ||
150 | }; | ||
151 | |||
150 | int register_virtio_driver(struct virtio_driver *driver) | 152 | int register_virtio_driver(struct virtio_driver *driver) |
151 | { | 153 | { |
152 | /* Catch this early. */ | 154 | /* Catch this early. */ |
153 | BUG_ON(driver->feature_table_size && !driver->feature_table); | 155 | BUG_ON(driver->feature_table_size && !driver->feature_table); |
154 | driver->driver.bus = &virtio_bus; | 156 | driver->driver.bus = &virtio_bus; |
155 | driver->driver.probe = virtio_dev_probe; | ||
156 | driver->driver.remove = virtio_dev_remove; | ||
157 | return driver_register(&driver->driver); | 157 | return driver_register(&driver->driver); |
158 | } | 158 | } |
159 | EXPORT_SYMBOL_GPL(register_virtio_driver); | 159 | EXPORT_SYMBOL_GPL(register_virtio_driver); |