diff options
Diffstat (limited to 'drivers/lguest/lguest_device.c')
-rw-r--r-- | drivers/lguest/lguest_device.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c index cc000e79c3d1..1401c1ace1ec 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c | |||
@@ -236,7 +236,7 @@ static void lg_notify(struct virtqueue *vq) | |||
236 | extern void lguest_setup_irq(unsigned int irq); | 236 | extern void lguest_setup_irq(unsigned int irq); |
237 | 237 | ||
238 | /* | 238 | /* |
239 | * This routine finds the first virtqueue described in the configuration of | 239 | * This routine finds the Nth virtqueue described in the configuration of |
240 | * this device and sets it up. | 240 | * this device and sets it up. |
241 | * | 241 | * |
242 | * This is kind of an ugly duckling. It'd be nicer to have a standard | 242 | * This is kind of an ugly duckling. It'd be nicer to have a standard |
@@ -244,9 +244,6 @@ extern void lguest_setup_irq(unsigned int irq); | |||
244 | * everyone wants to do it differently. The KVM coders want the Guest to | 244 | * everyone wants to do it differently. The KVM coders want the Guest to |
245 | * allocate its own pages and tell the Host where they are, but for lguest it's | 245 | * allocate its own pages and tell the Host where they are, but for lguest it's |
246 | * simpler for the Host to simply tell us where the pages are. | 246 | * simpler for the Host to simply tell us where the pages are. |
247 | * | ||
248 | * So we provide drivers with a "find the Nth virtqueue and set it up" | ||
249 | * function. | ||
250 | */ | 247 | */ |
251 | static struct virtqueue *lg_find_vq(struct virtio_device *vdev, | 248 | static struct virtqueue *lg_find_vq(struct virtio_device *vdev, |
252 | unsigned index, | 249 | unsigned index, |
@@ -422,7 +419,11 @@ static void add_lguest_device(struct lguest_device_desc *d, | |||
422 | 419 | ||
423 | /* This devices' parent is the lguest/ dir. */ | 420 | /* This devices' parent is the lguest/ dir. */ |
424 | ldev->vdev.dev.parent = lguest_root; | 421 | ldev->vdev.dev.parent = lguest_root; |
425 | /* We have a unique device index thanks to the dev_index counter. */ | 422 | /* |
423 | * The device type comes straight from the descriptor. There's also a | ||
424 | * device vendor field in the virtio_device struct, which we leave as | ||
425 | * 0. | ||
426 | */ | ||
426 | ldev->vdev.id.device = d->type; | 427 | ldev->vdev.id.device = d->type; |
427 | /* | 428 | /* |
428 | * We have a simple set of routines for querying the device's | 429 | * We have a simple set of routines for querying the device's |