diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2015-02-17 00:42:44 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-02-17 00:49:29 -0500 |
commit | 5b40a7daf51812b35cf05d1601a779a7043f8414 (patch) | |
tree | a3eead92bf39f83467547136cc597dd0003d3715 /drivers/virtio | |
parent | e68c48f97547979c91de04b487d79dc0d3be7015 (diff) |
virtio: don't set VIRTIO_CONFIG_S_DRIVER_OK twice.
I noticed this with the console device. It's not *wrong*, just a bit
weird.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/virtio')
-rw-r--r-- | drivers/virtio/virtio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index b9f70dfc4751..5ce2aa48fc6e 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c | |||
@@ -236,7 +236,10 @@ static int virtio_dev_probe(struct device *_d) | |||
236 | if (err) | 236 | if (err) |
237 | goto err; | 237 | goto err; |
238 | 238 | ||
239 | add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK); | 239 | /* If probe didn't do it, mark device DRIVER_OK ourselves. */ |
240 | if (!(dev->config->get_status(dev) & VIRTIO_CONFIG_S_DRIVER_OK)) | ||
241 | virtio_device_ready(dev); | ||
242 | |||
240 | if (drv->scan) | 243 | if (drv->scan) |
241 | drv->scan(dev); | 244 | drv->scan(dev); |
242 | 245 | ||