diff options
Diffstat (limited to 'drivers/virtio/virtio.c')
-rw-r--r-- | drivers/virtio/virtio.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index baf103361e3a..5b78fd0aff0a 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c | |||
@@ -113,7 +113,7 @@ static int virtio_dev_probe(struct device *_d) | |||
113 | set_bit(f, dev->features); | 113 | set_bit(f, dev->features); |
114 | } | 114 | } |
115 | 115 | ||
116 | /* Transport features are always preserved to pass to set_features. */ | 116 | /* Transport features always preserved to pass to finalize_features. */ |
117 | for (i = VIRTIO_TRANSPORT_F_START; i < VIRTIO_TRANSPORT_F_END; i++) | 117 | for (i = VIRTIO_TRANSPORT_F_START; i < VIRTIO_TRANSPORT_F_END; i++) |
118 | if (device_features & (1 << i)) | 118 | if (device_features & (1 << i)) |
119 | set_bit(i, dev->features); | 119 | set_bit(i, dev->features); |
@@ -122,8 +122,7 @@ static int virtio_dev_probe(struct device *_d) | |||
122 | if (err) | 122 | if (err) |
123 | add_status(dev, VIRTIO_CONFIG_S_FAILED); | 123 | add_status(dev, VIRTIO_CONFIG_S_FAILED); |
124 | else { | 124 | else { |
125 | /* They should never have set feature bits beyond 32 */ | 125 | dev->config->finalize_features(dev); |
126 | dev->config->set_features(dev, dev->features[0]); | ||
127 | add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK); | 126 | add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK); |
128 | } | 127 | } |
129 | return err; | 128 | return err; |