diff options
author | Johannes Berg <johannes.berg@intel.com> | 2014-02-20 11:55:12 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-02-20 11:55:12 +0100 |
commit | bf5f48339a019c9b4b42284c3f45d58942cbda27 (patch) | |
tree | 79976135166ffbdaf4ccb91bcadb17ddb551f060 /arch/powerpc/sysdev/axonram.c | |
parent | mac80211: remove erroneous comment about RX radiotap header (diff) | |
parent | Staging: rtl8812ae: remove modules field of rate_control_ops (diff) | |
download | linux-bf5f48339a019c9b4b42284c3f45d58942cbda27.tar.xz linux-bf5f48339a019c9b4b42284c3f45d58942cbda27.zip |
Merge remote-tracking branch 'wireless-next/master' into mac80211-next
Diffstat (limited to 'arch/powerpc/sysdev/axonram.c')
-rw-r--r-- | arch/powerpc/sysdev/axonram.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c index 1c16141c031c..47b6b9f81d43 100644 --- a/arch/powerpc/sysdev/axonram.c +++ b/arch/powerpc/sysdev/axonram.c @@ -109,27 +109,28 @@ axon_ram_make_request(struct request_queue *queue, struct bio *bio) struct axon_ram_bank *bank = bio->bi_bdev->bd_disk->private_data; unsigned long phys_mem, phys_end; void *user_mem; - struct bio_vec *vec; + struct bio_vec vec; unsigned int transfered; - unsigned short idx; + struct bvec_iter iter; - phys_mem = bank->io_addr + (bio->bi_sector << AXON_RAM_SECTOR_SHIFT); + phys_mem = bank->io_addr + (bio->bi_iter.bi_sector << + AXON_RAM_SECTOR_SHIFT); phys_end = bank->io_addr + bank->size; transfered = 0; - bio_for_each_segment(vec, bio, idx) { - if (unlikely(phys_mem + vec->bv_len > phys_end)) { + bio_for_each_segment(vec, bio, iter) { + if (unlikely(phys_mem + vec.bv_len > phys_end)) { bio_io_error(bio); return; } - user_mem = page_address(vec->bv_page) + vec->bv_offset; + user_mem = page_address(vec.bv_page) + vec.bv_offset; if (bio_data_dir(bio) == READ) - memcpy(user_mem, (void *) phys_mem, vec->bv_len); + memcpy(user_mem, (void *) phys_mem, vec.bv_len); else - memcpy((void *) phys_mem, user_mem, vec->bv_len); + memcpy((void *) phys_mem, user_mem, vec.bv_len); - phys_mem += vec->bv_len; - transfered += vec->bv_len; + phys_mem += vec.bv_len; + transfered += vec.bv_len; } bio_endio(bio, 0); } |