]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] st: remove struct scatterlist
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Thu, 18 Dec 2008 05:49:46 +0000 (14:49 +0900)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Fri, 2 Jan 2009 18:01:15 +0000 (12:01 -0600)
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>
drivers/scsi/st.c
drivers/scsi/st.h

index 1cfd217f8904d49e5c516eddb52c2104f41f56ca..f934016f640cb47817ec8b92d5c92581eca061a2 100644 (file)
@@ -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) {
index cc46f18762b768c38d3c3f50f9c1ed2bd591111b..d29760776f42274c7dbad6c0ab5137c616effdf2 100644 (file)
@@ -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 */