projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e68c48f
)
virtio: don't set VIRTIO_CONFIG_S_DRIVER_OK twice.
author
Rusty Russell
<rusty@rustcorp.com.au>
Tue, 17 Feb 2015 05:42:44 +0000
(16:12 +1030)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Tue, 17 Feb 2015 05:49:29 +0000
(16:19 +1030)
I noticed this with the console device. It's not *wrong*, just a bit
weird.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/virtio/virtio.c
patch
|
blob
|
history
diff --git
a/drivers/virtio/virtio.c
b/drivers/virtio/virtio.c
index b9f70dfc4751858da43f4f437ef10ac675d6340f..5ce2aa48fc6e0943031f28c2a51d639e71b52f36 100644
(file)
--- a/
drivers/virtio/virtio.c
+++ b/
drivers/virtio/virtio.c
@@
-236,7
+236,10
@@
static int virtio_dev_probe(struct device *_d)
if (err)
goto err;
- add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK);
+ /* If probe didn't do it, mark device DRIVER_OK ourselves. */
+ if (!(dev->config->get_status(dev) & VIRTIO_CONFIG_S_DRIVER_OK))
+ virtio_device_ready(dev);
+
if (drv->scan)
drv->scan(dev);