summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-core.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-10-29 21:48:06 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-29 21:48:06 -0700
commit9f75e1eff3edb2bb07349b94c28f4f2a6c66ca43 (patch)
tree27a73405d3652dc6771fab28721b70e6d44ff47a /drivers/scsi/libata-core.c
parentb1459461f1e0abd5c28317d6bff6f2ca612a719d (diff)
parent1b40efd772f4419fbc1a8940506424246985c333 (diff)
downloadblackbird-op-linux-9f75e1eff3edb2bb07349b94c28f4f2a6c66ca43.tar.gz
blackbird-op-linux-9f75e1eff3edb2bb07349b94c28f4f2a6c66ca43.zip
Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r--drivers/scsi/libata-core.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index b1b1c6f01419..5ca97605ff35 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -49,6 +49,7 @@
#include <linux/suspend.h>
#include <linux/workqueue.h>
#include <linux/jiffies.h>
+#include <linux/scatterlist.h>
#include <scsi/scsi.h>
#include "scsi.h"
#include "scsi_priv.h"
@@ -2576,19 +2577,12 @@ void ata_qc_prep(struct ata_queued_cmd *qc)
void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen)
{
- struct scatterlist *sg;
-
qc->flags |= ATA_QCFLAG_SINGLE;
- memset(&qc->sgent, 0, sizeof(qc->sgent));
qc->sg = &qc->sgent;
qc->n_elem = 1;
qc->buf_virt = buf;
-
- sg = qc->sg;
- sg->page = virt_to_page(buf);
- sg->offset = (unsigned long) buf & ~PAGE_MASK;
- sg->length = buflen;
+ sg_init_one(qc->sg, buf, buflen);
}
/**
OpenPOWER on IntegriCloud