summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2009-05-26 15:46:10 +0200
committerRusty Russell <rusty@rustcorp.com.au>2009-06-12 22:16:40 +0930
commite3353853730eb99c56b7b0aed1667d51c0e3699a (patch)
treed0da26c34a8ca12a57662830fd698ca6696f3805 /scripts
parentc89e80168ba1ed37627fe03116b0cf8474dcb7e0 (diff)
downloadop-kernel-dev-e3353853730eb99c56b7b0aed1667d51c0e3699a.zip
op-kernel-dev-e3353853730eb99c56b7b0aed1667d51c0e3699a.tar.gz
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 'scripts')
-rw-r--r--scripts/mod/file2alias.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index a334428..40e0045 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -641,7 +641,7 @@ static int do_virtio_entry(const char *filename, struct virtio_device_id *id,
id->vendor = TO_NATIVE(id->vendor);
strcpy(alias, "virtio:");
- ADD(alias, "d", 1, id->device);
+ ADD(alias, "d", id->device != VIRTIO_DEV_ANY_ID, id->device);
ADD(alias, "v", id->vendor != VIRTIO_DEV_ANY_ID, id->vendor);
add_wildcard(alias);
OpenPOWER on IntegriCloud