diff options
-rw-r--r-- | drivers/usb/misc/usbtest.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index da922dfc0dcc..b6b5b2affad1 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c | |||
@@ -378,6 +378,7 @@ alloc_sglist (int nents, int max, int vary) | |||
378 | sg = kmalloc (nents * sizeof *sg, GFP_KERNEL); | 378 | sg = kmalloc (nents * sizeof *sg, GFP_KERNEL); |
379 | if (!sg) | 379 | if (!sg) |
380 | return NULL; | 380 | return NULL; |
381 | sg_init_table(sg, nents); | ||
381 | 382 | ||
382 | for (i = 0; i < nents; i++) { | 383 | for (i = 0; i < nents; i++) { |
383 | char *buf; | 384 | char *buf; |
@@ -390,7 +391,7 @@ alloc_sglist (int nents, int max, int vary) | |||
390 | } | 391 | } |
391 | 392 | ||
392 | /* kmalloc pages are always physically contiguous! */ | 393 | /* kmalloc pages are always physically contiguous! */ |
393 | sg_init_one(&sg[i], buf, size); | 394 | sg_set_buf(&sg[i], buf, size); |
394 | 395 | ||
395 | switch (pattern) { | 396 | switch (pattern) { |
396 | case 0: | 397 | case 0: |