summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-12-18 14:49:46 +0900
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-01-02 12:01:15 -0600
commitb3d59115ba2b2550d70eafd929f1fa607fe588dc (patch)
treed7a14f59a05d0c2ff58e62f74770b2b3d34d6580 /drivers/scsi
parent08c95832427b449ecfb357696f7b8e239b79a72c (diff)
downloadblackbird-op-linux-b3d59115ba2b2550d70eafd929f1fa607fe588dc.tar.gz
blackbird-op-linux-b3d59115ba2b2550d70eafd929f1fa607fe588dc.zip
[SCSI] st: remove struct scatterlist
This removes the usage of struct scatterlist completely. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Kai Makisara <Kai.Makisara@kolumbus.fi> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/st.c8
-rw-r--r--drivers/scsi/st.h1
2 files changed, 2 insertions, 7 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 1cfd217f8904..f934016f640c 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -3744,7 +3744,7 @@ static long st_compat_ioctl(struct file *file, unsigned int cmd, unsigned long a
static struct st_buffer *
new_tape_buffer(int from_initialization, int need_dma, int max_sg)
{
- int i, got = 0;
+ int got = 0;
gfp_t priority;
struct st_buffer *tb;
@@ -3753,10 +3753,7 @@ static struct st_buffer *
else
priority = GFP_KERNEL;
- i = sizeof(struct st_buffer) +
- (max_sg - 1) * sizeof(struct scatterlist);
-
- tb = kzalloc(i, priority);
+ tb = kzalloc(sizeof(struct st_buffer), priority);
if (!tb) {
printk(KERN_NOTICE "st: Can't allocate new tape buffer.\n");
return NULL;
@@ -3766,7 +3763,6 @@ static struct st_buffer *
tb->dma = need_dma;
tb->buffer_size = got;
- sg_init_table(tb->sg, max_sg);
tb->reserved_pages = kzalloc(max_sg * sizeof(struct page *), priority);
if (!tb->reserved_pages) {
diff --git a/drivers/scsi/st.h b/drivers/scsi/st.h
index cc46f18762b7..d29760776f42 100644
--- a/drivers/scsi/st.h
+++ b/drivers/scsi/st.h
@@ -54,7 +54,6 @@ struct st_buffer {
unsigned short orig_frp_segs; /* number of segments allocated at first try */
unsigned short frp_segs; /* number of buffer segments */
unsigned int frp_sg_current; /* driver buffer length currently in s/g list */
- struct scatterlist sg[1]; /* MUST BE last item */
};
/* The tape mode definition */
OpenPOWER on IntegriCloud