aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/virtio/virtio.c2
-rw-r--r--scripts/mod/file2alias.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index 22642a255d32..3a43ebf83a49 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -58,7 +58,7 @@ static struct device_attribute virtio_dev_attrs[] = {
58static inline int virtio_id_match(const struct virtio_device *dev, 58static inline int virtio_id_match(const struct virtio_device *dev,
59 const struct virtio_device_id *id) 59 const struct virtio_device_id *id)
60{ 60{
61 if (id->device != dev->id.device) 61 if (id->device != dev->id.device && id->device != VIRTIO_DEV_ANY_ID)
62 return 0; 62 return 0;
63 63
64 return id->vendor == VIRTIO_DEV_ANY_ID || id->vendor == dev->id.vendor; 64 return id->vendor == VIRTIO_DEV_ANY_ID || id->vendor == dev->id.vendor;
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index a3344285ccf4..40e0045876ee 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,
641 id->vendor = TO_NATIVE(id->vendor); 641 id->vendor = TO_NATIVE(id->vendor);
642 642
643 strcpy(alias, "virtio:"); 643 strcpy(alias, "virtio:");
644 ADD(alias, "d", 1, id->device); 644 ADD(alias, "d", id->device != VIRTIO_DEV_ANY_ID, id->device);
645 ADD(alias, "v", id->vendor != VIRTIO_DEV_ANY_ID, id->vendor); 645 ADD(alias, "v", id->vendor != VIRTIO_DEV_ANY_ID, id->vendor);
646 646
647 add_wildcard(alias); 647 add_wildcard(alias);