diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2008-12-18 00:49:46 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-01-02 13:01:15 -0500 |
commit | b3d59115ba2b2550d70eafd929f1fa607fe588dc (patch) | |
tree | d7a14f59a05d0c2ff58e62f74770b2b3d34d6580 /drivers/scsi/st.c | |
parent | 08c95832427b449ecfb357696f7b8e239b79a72c (diff) |
[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/st.c')
-rw-r--r-- | drivers/scsi/st.c | 8 |
1 files changed, 2 insertions, 6 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 | |||
3744 | static struct st_buffer * | 3744 | static struct st_buffer * |
3745 | new_tape_buffer(int from_initialization, int need_dma, int max_sg) | 3745 | new_tape_buffer(int from_initialization, int need_dma, int max_sg) |
3746 | { | 3746 | { |
3747 | int i, got = 0; | 3747 | int got = 0; |
3748 | gfp_t priority; | 3748 | gfp_t priority; |
3749 | struct st_buffer *tb; | 3749 | struct st_buffer *tb; |
3750 | 3750 | ||
@@ -3753,10 +3753,7 @@ static struct st_buffer * | |||
3753 | else | 3753 | else |
3754 | priority = GFP_KERNEL; | 3754 | priority = GFP_KERNEL; |
3755 | 3755 | ||
3756 | i = sizeof(struct st_buffer) + | 3756 | tb = kzalloc(sizeof(struct st_buffer), priority); |
3757 | (max_sg - 1) * sizeof(struct scatterlist); | ||
3758 | |||
3759 | tb = kzalloc(i, priority); | ||
3760 | if (!tb) { | 3757 | if (!tb) { |
3761 | printk(KERN_NOTICE "st: Can't allocate new tape buffer.\n"); | 3758 | printk(KERN_NOTICE "st: Can't allocate new tape buffer.\n"); |
3762 | return NULL; | 3759 | return NULL; |
@@ -3766,7 +3763,6 @@ static struct st_buffer * | |||
3766 | 3763 | ||
3767 | tb->dma = need_dma; | 3764 | tb->dma = need_dma; |
3768 | tb->buffer_size = got; | 3765 | tb->buffer_size = got; |
3769 | sg_init_table(tb->sg, max_sg); | ||
3770 | 3766 | ||
3771 | tb->reserved_pages = kzalloc(max_sg * sizeof(struct page *), priority); | 3767 | tb->reserved_pages = kzalloc(max_sg * sizeof(struct page *), priority); |
3772 | if (!tb->reserved_pages) { | 3768 | if (!tb->reserved_pages) { |