aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/bsg.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/block/bsg.c b/block/bsg.c
index 724b69391cdc..53a09a52d154 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -16,7 +16,6 @@
16 * seperated right now. 16 * seperated right now.
17 * 17 *
18 */ 18 */
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include <linux/file.h> 21#include <linux/file.h>
@@ -347,8 +346,8 @@ static void bsg_rq_end_io(struct request *rq, int uptodate)
347 struct bsg_device *bd = bc->bd; 346 struct bsg_device *bd = bc->bd;
348 unsigned long flags; 347 unsigned long flags;
349 348
350 dprintk("%s: finished rq %p bio %p, bc %p offset %ld stat %d\n", 349 dprintk("%s: finished rq %p bc %p, bio %p offset %d stat %d\n",
351 bd->name, rq, bc, bc->bio, bc - bd->cmd_map, uptodate); 350 bd->name, rq, bc, bc->bio, bc - bd->cmd_map, uptodate);
352 351
353 bc->hdr.duration = jiffies_to_msecs(jiffies - bc->hdr.duration); 352 bc->hdr.duration = jiffies_to_msecs(jiffies - bc->hdr.duration);
354 353
@@ -562,7 +561,7 @@ bsg_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
562 int ret; 561 int ret;
563 ssize_t bytes_read; 562 ssize_t bytes_read;
564 563
565 dprintk("%s: read %lu bytes\n", bd->name, count); 564 dprintk("%s: read %Zd bytes\n", bd->name, count);
566 565
567 bsg_set_block(bd, file); 566 bsg_set_block(bd, file);
568 bytes_read = 0; 567 bytes_read = 0;
@@ -642,7 +641,7 @@ bsg_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
642 ssize_t bytes_read; 641 ssize_t bytes_read;
643 int ret; 642 int ret;
644 643
645 dprintk("%s: write %lu bytes\n", bd->name, count); 644 dprintk("%s: write %Zd bytes\n", bd->name, count);
646 645
647 bsg_set_block(bd, file); 646 bsg_set_block(bd, file);
648 bsg_set_write_perm(bd, file); 647 bsg_set_write_perm(bd, file);
@@ -657,7 +656,7 @@ bsg_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
657 if (!bytes_read || (bytes_read && err_block_err(ret))) 656 if (!bytes_read || (bytes_read && err_block_err(ret)))
658 bytes_read = ret; 657 bytes_read = ret;
659 658
660 dprintk("%s: returning %lu\n", bd->name, bytes_read); 659 dprintk("%s: returning %Zd\n", bd->name, bytes_read);
661 return bytes_read; 660 return bytes_read;
662} 661}
663 662
@@ -768,7 +767,7 @@ static struct bsg_device *bsg_add_device(struct inode *inode,
768 767
769 strncpy(bd->name, disk->disk_name, sizeof(bd->name) - 1); 768 strncpy(bd->name, disk->disk_name, sizeof(bd->name) - 1);
770 dprintk("bound to <%s>, max queue %d\n", 769 dprintk("bound to <%s>, max queue %d\n",
771 format_dev_t(buf, i->i_rdev), bd->max_queue); 770 format_dev_t(buf, inode->i_rdev), bd->max_queue);
772 771
773 mutex_unlock(&bsg_mutex); 772 mutex_unlock(&bsg_mutex);
774 return bd; 773 return bd;