diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2009-05-26 13:46:10 (GMT) |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-06-12 12:46:40 (GMT) |
commit | e3353853730eb99c56b7b0aed1667d51c0e3699a (patch) | |
tree | d0da26c34a8ca12a57662830fd698ca6696f3805 /drivers | |
parent | c89e80168ba1ed37627fe03116b0cf8474dcb7e0 (diff) | |
download | linux-fsl-qoriq-e3353853730eb99c56b7b0aed1667d51c0e3699a.tar.xz |
virtio: enhance id_matching for virtio drivers
This patch allows a virtio driver to use VIRTIO_DEV_ANY_ID for the
device id. This will be used by a test module that can be bound to
any virtio device.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/virtio/virtio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 22642a2..3a43ebf 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -58,7 +58,7 @@ static struct device_attribute virtio_dev_attrs[] = { static inline int virtio_id_match(const struct virtio_device *dev, const struct virtio_device_id *id) { - if (id->device != dev->id.device) + if (id->device != dev->id.device && id->device != VIRTIO_DEV_ANY_ID) return 0; return id->vendor == VIRTIO_DEV_ANY_ID || id->vendor == dev->id.vendor; |