virtio/s390: use dev_to_virtio
authorGeliang Tang <geliangtang@163.com>
Tue, 1 Mar 2016 12:44:52 +0000 (13:44 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 2 Mar 2016 16:08:58 +0000 (18:08 +0200)
Use dev_to_virtio() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Message-Id: <912bf59bd3a48f2d4d4994681e898dc084fe29d3.1451484163.git.geliangtang@163.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/s390/virtio/virtio_ccw.c

index bf2d1300a9578817d5b14df9cd8664838d0189e5..46b110a124b0f199b50a805151ebf086a4863259 100644 (file)
@@ -945,8 +945,7 @@ static struct virtio_config_ops virtio_ccw_config_ops = {
 
 static void virtio_ccw_release_dev(struct device *_d)
 {
-       struct virtio_device *dev = container_of(_d, struct virtio_device,
-                                                dev);
+       struct virtio_device *dev = dev_to_virtio(_d);
        struct virtio_ccw_device *vcdev = to_vc_device(dev);
 
        kfree(vcdev->status);