Thread (34 messages) 34 messages, 3 authors, 2014-10-06

[PATCH 03/16] virtio: refactor to use drv_to_virtio

flat view
STALE4385d

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2014-10-05 16:03:35
Also in: lkml
Subsystem: the rest, virtio core · Maintainers: Linus Torvalds, "Michael S. Tsirkin", Jason Wang, Eugenio Pérez

Revision v1 of 4 in this series.

Revisions (4)
  1. v1 current
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 [diff vs current]
Use drv_to_virtio instead of open-coding it.
Fix whitespace damage introduced by
        virtio: unify config_changed handling

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 drivers/virtio/virtio.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index 470b74f..3980687 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -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);
-- 
MST
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help