* [PATCH] virtio: refactor to use drv_to_virtio
@ 2014-09-22 8:03 Michael S. Tsirkin
0 siblings, 0 replies; only message in thread
From: Michael S. Tsirkin @ 2014-09-22 8:03 UTC (permalink / raw)
To: linux-kernel
Cc: Christian Borntraeger, Cornelia Huck, linux390,
Martin Schwidefsky, Heiko Carstens, Rusty Russell, Ashutosh Dixit,
Greg Kroah-Hartman, Sudeep Dutt, Nikhil Rao,
Dasaratharaman Chandramouli, Wolfram Sang, Siva Yerramreddy,
Heinz Graalfs, linux-s390, virtualization
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>
---
Note: I'll probably smash this into the previous patch.
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-09-22 8:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-22 8:03 [PATCH] virtio: refactor to use drv_to_virtio Michael S. Tsirkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).