diff options
Diffstat (limited to 'drivers/ide/ide-probe.c')
| -rw-r--r-- | drivers/ide/ide-probe.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index d5146c57e5b3..6a6f2e066b46 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
| @@ -47,6 +47,7 @@ | |||
| 47 | #include <linux/spinlock.h> | 47 | #include <linux/spinlock.h> |
| 48 | #include <linux/kmod.h> | 48 | #include <linux/kmod.h> |
| 49 | #include <linux/pci.h> | 49 | #include <linux/pci.h> |
| 50 | #include <linux/scatterlist.h> | ||
| 50 | 51 | ||
| 51 | #include <asm/byteorder.h> | 52 | #include <asm/byteorder.h> |
| 52 | #include <asm/irq.h> | 53 | #include <asm/irq.h> |
| @@ -1317,12 +1318,14 @@ static int hwif_init(ide_hwif_t *hwif) | |||
| 1317 | if (!hwif->sg_max_nents) | 1318 | if (!hwif->sg_max_nents) |
| 1318 | hwif->sg_max_nents = PRD_ENTRIES; | 1319 | hwif->sg_max_nents = PRD_ENTRIES; |
| 1319 | 1320 | ||
| 1320 | hwif->sg_table = kzalloc(sizeof(struct scatterlist)*hwif->sg_max_nents, | 1321 | hwif->sg_table = kmalloc(sizeof(struct scatterlist)*hwif->sg_max_nents, |
| 1321 | GFP_KERNEL); | 1322 | GFP_KERNEL); |
| 1322 | if (!hwif->sg_table) { | 1323 | if (!hwif->sg_table) { |
| 1323 | printk(KERN_ERR "%s: unable to allocate SG table.\n", hwif->name); | 1324 | printk(KERN_ERR "%s: unable to allocate SG table.\n", hwif->name); |
| 1324 | goto out; | 1325 | goto out; |
| 1325 | } | 1326 | } |
| 1327 | |||
| 1328 | sg_init_table(hwif->sg_table, hwif->sg_max_nents); | ||
| 1326 | 1329 | ||
| 1327 | if (init_irq(hwif) == 0) | 1330 | if (init_irq(hwif) == 0) |
| 1328 | goto done; | 1331 | goto done; |
