diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/sysdev/axonram.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c index f33bcbaa6a07..47b6b9f81d43 100644 --- a/arch/powerpc/sysdev/axonram.c +++ b/arch/powerpc/sysdev/axonram.c | |||
@@ -109,28 +109,28 @@ axon_ram_make_request(struct request_queue *queue, struct bio *bio) | |||
109 | struct axon_ram_bank *bank = bio->bi_bdev->bd_disk->private_data; | 109 | struct axon_ram_bank *bank = bio->bi_bdev->bd_disk->private_data; |
110 | unsigned long phys_mem, phys_end; | 110 | unsigned long phys_mem, phys_end; |
111 | void *user_mem; | 111 | void *user_mem; |
112 | struct bio_vec *vec; | 112 | struct bio_vec vec; |
113 | unsigned int transfered; | 113 | unsigned int transfered; |
114 | unsigned short idx; | 114 | struct bvec_iter iter; |
115 | 115 | ||
116 | phys_mem = bank->io_addr + (bio->bi_iter.bi_sector << | 116 | phys_mem = bank->io_addr + (bio->bi_iter.bi_sector << |
117 | AXON_RAM_SECTOR_SHIFT); | 117 | AXON_RAM_SECTOR_SHIFT); |
118 | phys_end = bank->io_addr + bank->size; | 118 | phys_end = bank->io_addr + bank->size; |
119 | transfered = 0; | 119 | transfered = 0; |
120 | bio_for_each_segment(vec, bio, idx) { | 120 | bio_for_each_segment(vec, bio, iter) { |
121 | if (unlikely(phys_mem + vec->bv_len > phys_end)) { | 121 | if (unlikely(phys_mem + vec.bv_len > phys_end)) { |
122 | bio_io_error(bio); | 122 | bio_io_error(bio); |
123 | return; | 123 | return; |
124 | } | 124 | } |
125 | 125 | ||
126 | user_mem = page_address(vec->bv_page) + vec->bv_offset; | 126 | user_mem = page_address(vec.bv_page) + vec.bv_offset; |
127 | if (bio_data_dir(bio) == READ) | 127 | if (bio_data_dir(bio) == READ) |
128 | memcpy(user_mem, (void *) phys_mem, vec->bv_len); | 128 | memcpy(user_mem, (void *) phys_mem, vec.bv_len); |
129 | else | 129 | else |
130 | memcpy((void *) phys_mem, user_mem, vec->bv_len); | 130 | memcpy((void *) phys_mem, user_mem, vec.bv_len); |
131 | 131 | ||
132 | phys_mem += vec->bv_len; | 132 | phys_mem += vec.bv_len; |
133 | transfered += vec->bv_len; | 133 | transfered += vec.bv_len; |
134 | } | 134 | } |
135 | bio_endio(bio, 0); | 135 | bio_endio(bio, 0); |
136 | } | 136 | } |