i2c: Delete 10 unused driver IDs
[safe/jmp/linux-2.6] / drivers / virtio / virtio.c
index fc85cba..018c070 100644 (file)
@@ -113,12 +113,16 @@ static int virtio_dev_probe(struct device *_d)
                        set_bit(f, dev->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);
+
        err = drv->probe(dev);
        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;
@@ -172,7 +176,7 @@ int register_virtio_device(struct virtio_device *dev)
 
        /* Assign a unique device index and hence name. */
        dev->index = dev_index++;
-       sprintf(dev->dev.bus_id, "virtio%u", dev->index);
+       dev_set_name(&dev->dev, "virtio%u", dev->index);
 
        /* We always start by resetting the device, in case a previous
         * driver messed it up.  This also tests that code path a little. */