diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-26 22:17:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-26 22:17:19 -0500 |
commit | f4d53cedce872fe1439818d15e067b497b5d466f (patch) | |
tree | b6942135c8a4235cb409a833d736307eaecdbc90 /Documentation | |
parent | 9bb9f2220e6d904f60f9f72209b5313d0808f0c2 (diff) | |
parent | 8329d98e480250ef5f5a083f9c3af50510b5e65d (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
virtio: fix net driver loop case where we fail to restart
module: fix and elaborate comments
virtio: fix module/device unloading
lguest: Fix uninitialized members in example launcher
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/lguest/lguest.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index 42008395534d..9b0e322118b5 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c | |||
@@ -1040,6 +1040,11 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs, | |||
1040 | / getpagesize(); | 1040 | / getpagesize(); |
1041 | p = get_pages(pages); | 1041 | p = get_pages(pages); |
1042 | 1042 | ||
1043 | /* Initialize the virtqueue */ | ||
1044 | vq->next = NULL; | ||
1045 | vq->last_avail_idx = 0; | ||
1046 | vq->dev = dev; | ||
1047 | |||
1043 | /* Initialize the configuration. */ | 1048 | /* Initialize the configuration. */ |
1044 | vq->config.num = num_descs; | 1049 | vq->config.num = num_descs; |
1045 | vq->config.irq = devices.next_irq++; | 1050 | vq->config.irq = devices.next_irq++; |
@@ -1057,9 +1062,6 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs, | |||
1057 | for (i = &dev->vq; *i; i = &(*i)->next); | 1062 | for (i = &dev->vq; *i; i = &(*i)->next); |
1058 | *i = vq; | 1063 | *i = vq; |
1059 | 1064 | ||
1060 | /* Link virtqueue back to device. */ | ||
1061 | vq->dev = dev; | ||
1062 | |||
1063 | /* Set the routine to call when the Guest does something to this | 1065 | /* Set the routine to call when the Guest does something to this |
1064 | * virtqueue. */ | 1066 | * virtqueue. */ |
1065 | vq->handle_output = handle_output; | 1067 | vq->handle_output = handle_output; |
@@ -1093,6 +1095,7 @@ static struct device *new_device(const char *name, u16 type, int fd, | |||
1093 | dev->desc = new_dev_desc(type); | 1095 | dev->desc = new_dev_desc(type); |
1094 | dev->handle_input = handle_input; | 1096 | dev->handle_input = handle_input; |
1095 | dev->name = name; | 1097 | dev->name = name; |
1098 | dev->vq = NULL; | ||
1096 | return dev; | 1099 | return dev; |
1097 | } | 1100 | } |
1098 | 1101 | ||