summaryrefslogtreecommitdiffstats
path: root/drivers/virtio/virtio.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2008-07-25 12:06:07 -0500
committerRusty Russell <rusty@rustcorp.com.au>2008-07-25 12:06:12 +1000
commitc624896e488ba2bff5ae497782cfb265c8b00646 (patch)
tree714145903ff8c889e9544e8366b2ee2a62234c0c /drivers/virtio/virtio.c
parentdd7c7bc46211785a1aa7d70feb15830f62682b3c (diff)
downloadop-kernel-dev-c624896e488ba2bff5ae497782cfb265c8b00646.zip
op-kernel-dev-c624896e488ba2bff5ae497782cfb265c8b00646.tar.gz
virtio: Rename set_features to finalize_features
Rather than explicitly handing the features to the lower-level, we just hand the virtio_device and have it set the features. This make it clear that it has the chance to manipulate the features of the device at this point (and that all feature negotiation is already done). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/virtio/virtio.c')
-rw-r--r--drivers/virtio/virtio.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index baf1033..5b78fd0 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -113,7 +113,7 @@ static int virtio_dev_probe(struct device *_d)
set_bit(f, dev->features);
}
- /* Transport features are always preserved to pass to set_features. */
+ /* Transport features always preserved to pass to finalize_features. */
for (i = VIRTIO_TRANSPORT_F_START; i < VIRTIO_TRANSPORT_F_END; i++)
if (device_features & (1 << i))
set_bit(i, dev->features);
@@ -122,8 +122,7 @@ static int virtio_dev_probe(struct device *_d)
if (err)
add_status(dev, VIRTIO_CONFIG_S_FAILED);
else {
- /* They should never have set feature bits beyond 32 */
- dev->config->set_features(dev, dev->features[0]);
+ dev->config->finalize_features(dev);
add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK);
}
return err;
OpenPOWER on IntegriCloud