Commit df993fb5 authored by Alexander Viro's avatar Alexander Viro Committed by Andy Grover

[PATCH] misc cleanups

 - compile fixes in amiflop.c
 - removal of dead local variables in ll_rw_blk.c
 - removed gratitious devfs_get_handle() in usb/input/hiddev.c
   (no need to do lookup for "usb" and then create "hid" in
   there - enough to create "usb/hid" at once).
parent 58da1aad
......@@ -1586,7 +1586,6 @@ static int floppy_open(struct inode *inode, struct file *filp)
int drive = minor(inode->i_rdev) & 3;
int system = (minor(inode->i_rdev) & 4) >> 2;
int old_dev;
int system;
unsigned long flags;
old_dev = fd_device[drive];
......@@ -1621,7 +1620,7 @@ static int floppy_open(struct inode *inode, struct file *filp)
restore_flags(flags);
if (old_dev != system)
invalidate_buffers(mk_kdev(MAJOR_NR, drive + (system << 2));
invalidate_buffers(mk_kdev(MAJOR_NR, drive + (system << 2)));
unit[drive].dtype=&data_types[system];
unit[drive].blocks=unit[drive].type->heads*unit[drive].type->tracks*
......
......@@ -1386,7 +1386,6 @@ void blk_insert_request(request_queue_t *q, struct request *rq,
void drive_stat_acct(struct request *rq, int nr_sectors, int new_io)
{
int rw = rq_data_dir(rq);
unsigned int major, index;
if (!rq->rq_disk)
return;
......@@ -1404,9 +1403,6 @@ void drive_stat_acct(struct request *rq, int nr_sectors, int new_io)
disk_round_stats(rq->rq_disk);
rq->rq_disk->in_flight++;
}
major = rq->rq_disk->major;
index = rq->rq_disk->first_minor >> rq->rq_disk->minor_shift;
}
/*
......
......@@ -765,11 +765,7 @@ static /* const */ struct usb_driver hiddev_driver = {
int __init hiddev_init(void)
{
devfs_handle_t de;
de = devfs_get_handle(NULL, "usb", 0, 0, 0, 0);
hiddev_devfs_handle = devfs_mk_dir(de, "hid", NULL);
devfs_put(de);
hiddev_devfs_handle = devfs_mk_dir(NULL, "usb/hid", NULL);
usb_register(&hiddev_driver);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment