diff options
Diffstat (limited to 'drivers/block/ps3vram.c')
| -rw-r--r-- | drivers/block/ps3vram.c | 25 | 
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c index b3bdb8af89c..ef45cfb98fd 100644 --- a/drivers/block/ps3vram.c +++ b/drivers/block/ps3vram.c @@ -10,6 +10,7 @@  #include <linux/blkdev.h>  #include <linux/delay.h> +#include <linux/module.h>  #include <linux/proc_fs.h>  #include <linux/seq_file.h>  #include <linux/slab.h> @@ -524,7 +525,7 @@ static int ps3vram_proc_show(struct seq_file *m, void *v)  static int ps3vram_proc_open(struct inode *inode, struct file *file)  { -	return single_open(file, ps3vram_proc_show, PDE(inode)->data); +	return single_open(file, ps3vram_proc_show, PDE_DATA(inode));  }  static const struct file_operations ps3vram_proc_fops = { @@ -535,7 +536,7 @@ static const struct file_operations ps3vram_proc_fops = {  	.release	= single_release,  }; -static void __devinit ps3vram_proc_init(struct ps3_system_bus_device *dev) +static void ps3vram_proc_init(struct ps3_system_bus_device *dev)  {  	struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);  	struct proc_dir_entry *pde; @@ -552,16 +553,16 @@ static struct bio *ps3vram_do_bio(struct ps3_system_bus_device *dev,  	struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);  	int write = bio_data_dir(bio) == WRITE;  	const char *op = write ? "write" : "read"; -	loff_t offset = bio->bi_sector << 9; +	loff_t offset = bio->bi_iter.bi_sector << 9;  	int error = 0; -	struct bio_vec *bvec; -	unsigned int i; +	struct bio_vec bvec; +	struct bvec_iter iter;  	struct bio *next; -	bio_for_each_segment(bvec, bio, i) { +	bio_for_each_segment(bvec, bio, iter) {  		/* PS3 is ppc64, so we don't handle highmem */ -		char *ptr = page_address(bvec->bv_page) + bvec->bv_offset; -		size_t len = bvec->bv_len, retlen; +		char *ptr = page_address(bvec.bv_page) + bvec.bv_offset; +		size_t len = bvec.bv_len, retlen;  		dev_dbg(&dev->core, "    %s %zu bytes at offset %llu\n", op,  			len, offset); @@ -596,7 +597,7 @@ out:  	return next;  } -static int ps3vram_make_request(struct request_queue *q, struct bio *bio) +static void ps3vram_make_request(struct request_queue *q, struct bio *bio)  {  	struct ps3_system_bus_device *dev = q->queuedata;  	struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev); @@ -610,16 +611,14 @@ static int ps3vram_make_request(struct request_queue *q, struct bio *bio)  	spin_unlock_irq(&priv->lock);  	if (busy) -		return 0; +		return;  	do {  		bio = ps3vram_do_bio(dev, bio);  	} while (bio); - -	return 0;  } -static int __devinit ps3vram_probe(struct ps3_system_bus_device *dev) +static int ps3vram_probe(struct ps3_system_bus_device *dev)  {  	struct ps3vram_priv *priv;  	int error, status;  | 
