Commit f0711455 authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Linus Torvalds

[PATCH] s390: tape driver.

 - Fix use of tape block request queue pointer.
 - Remove unnecessary includes.
parent 864ba9cd
......@@ -15,7 +15,6 @@
#include <linux/config.h>
#include <linux/blkdev.h>
#include <linux/kernel.h>
#include <linux/version.h>
#include <linux/module.h>
#include <linux/mtio.h>
#include <linux/interrupt.h>
......
......@@ -10,7 +10,6 @@
*/
#include <linux/config.h>
#include <linux/version.h>
#include <linux/module.h>
#include <linux/blkdev.h>
#include <linux/interrupt.h>
......@@ -68,7 +67,7 @@ __tapeblock_end_request(struct tape_request *ccw_req, void *data)
device->blk_data.block_position = -1;
device->discipline->free_bread(ccw_req);
if (!list_empty(&device->req_queue) ||
elv_next_request(&device->blk_data.request_queue))
elv_next_request(device->blk_data.request_queue))
tasklet_schedule(&device->blk_data.tasklet);
}
......@@ -88,7 +87,7 @@ __tape_process_blk_queue(struct tape_device *device, struct list_head *new_req)
owns the device. tape_state != TS_IN_USE is NOT enough. */
if (device->tape_state != TS_IN_USE)
return;
queue = &device->blk_data.request_queue;
queue = device->blk_data.request_queue;
nr_queued = 0;
/* Count number of requests on ccw queue. */
list_for_each(l, &device->req_queue)
......@@ -186,7 +185,7 @@ tapeblock_tasklet(unsigned long data)
struct tape_device *device;
device = (struct tape_device *) data;
while (elv_next_request(&device->blk_data.request_queue)) {
while (elv_next_request(device->blk_data.request_queue)) {
INIT_LIST_HEAD(&new_req);
spin_lock_irq(get_ccwdev_lock(device->cdev));
__tape_process_blk_queue(device, &new_req);
......@@ -219,9 +218,10 @@ tapeblock_setup_device(struct tape_device * device)
spin_lock_init(&d->request_queue_lock);
q = blk_init_queue(tapeblock_request_fn, &d->request_queue_lock);
if (!q)
if (!q) {
rc = -ENXIO;
goto put_disk;
}
d->request_queue = q;
elevator_exit(q);
rc = elevator_init(q, &elevator_noop);
......
......@@ -11,7 +11,6 @@
*/
#include <linux/config.h>
#include <linux/version.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/proc_fs.h>
......
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