Skip to contentSkip to conversation

virtio: refactor to use drv_to_virtio

PATCH New Michael S. Tsirkin 1 participant 1 message Sep 22, 2014

Subsystems (2)
lore
Share & tools
lore

Michael S. Tsirkin

author maintainer
#0 lore raw

PATCH 1/1 virtio: refactor to use drv_to_virtio

Use drv_to_virtio instead of open-coding it.
Fix whitespace damage introduced by
virtio: unify config_changed handling

---

Note: I'll probably smash this into the previous patch.

 drivers/virtio/virtio.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/virtio/virtio.c +1 -2
index 470b74f..3980687 100644
@@ -241,8 +241,7 @@ EXPORT_SYMBOL_GPL(unregister_virtio_device);
 
 void virtio_config_changed(struct virtio_device *dev)
 {
-        struct virtio_driver *drv = container_of(dev->dev.driver,
-						 struct virtio_driver, driver);
+	struct virtio_driver *drv = drv_to_virtio(dev->dev.driver);
 
 	if (drv && drv->config_changed)
 		drv->config_changed(dev);
Signature · 1 line
MST