aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-probe.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-10-22 15:19:53 -0400
committerJens Axboe <jens.axboe@oracle.com>2007-10-22 15:19:53 -0400
commit45711f1af6eff1a6d010703b4862e0d2b9afd056 (patch)
tree3d0048f46e3df9d217d56127462ebe680348bd5a /drivers/ide/ide-probe.c
parent78c2f0b8c285c5305b3e67b0595200541e15eb43 (diff)
[SG] Update drivers to use sg helpers
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r--drivers/ide/ide-probe.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index d5146c57e5b3..ec55a173c08a 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1317,12 +1317,14 @@ static int hwif_init(ide_hwif_t *hwif)
1317 if (!hwif->sg_max_nents) 1317 if (!hwif->sg_max_nents)
1318 hwif->sg_max_nents = PRD_ENTRIES; 1318 hwif->sg_max_nents = PRD_ENTRIES;
1319 1319
1320 hwif->sg_table = kzalloc(sizeof(struct scatterlist)*hwif->sg_max_nents, 1320 hwif->sg_table = kmalloc(sizeof(struct scatterlist)*hwif->sg_max_nents,
1321 GFP_KERNEL); 1321 GFP_KERNEL);
1322 if (!hwif->sg_table) { 1322 if (!hwif->sg_table) {
1323 printk(KERN_ERR "%s: unable to allocate SG table.\n", hwif->name); 1323 printk(KERN_ERR "%s: unable to allocate SG table.\n", hwif->name);
1324 goto out; 1324 goto out;
1325 } 1325 }
1326
1327 sg_init_table(hwif->sg_table, hwif->sg_max_nents);
1326 1328
1327 if (init_irq(hwif) == 0) 1329 if (init_irq(hwif) == 0)
1328 goto done; 1330 goto done;