diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-12-21 11:46:30 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-12-21 11:46:30 +0100 |
commit | 1d9d4495001d3c470e5c902ff35a6aa626924fc1 (patch) | |
tree | 1ae39f4ccadb610bc16fea88a1f93b23a4df37b1 /block/noop-iosched.c | |
parent | ALSA: fm801: store struct device instead of pci_dev (diff) | |
parent | ALSA: hda - Move audio component accesses to hdac_i915.c (diff) | |
download | linux-1d9d4495001d3c470e5c902ff35a6aa626924fc1.tar.xz linux-1d9d4495001d3c470e5c902ff35a6aa626924fc1.zip |
Merge branch 'topic/hdmi-jack' into for-next
Diffstat (limited to 'block/noop-iosched.c')
-rw-r--r-- | block/noop-iosched.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/block/noop-iosched.c b/block/noop-iosched.c index 3de89d4690f3..a163c487cf38 100644 --- a/block/noop-iosched.c +++ b/block/noop-iosched.c @@ -21,10 +21,10 @@ static void noop_merged_requests(struct request_queue *q, struct request *rq, static int noop_dispatch(struct request_queue *q, int force) { struct noop_data *nd = q->elevator->elevator_data; + struct request *rq; - if (!list_empty(&nd->queue)) { - struct request *rq; - rq = list_entry(nd->queue.next, struct request, queuelist); + rq = list_first_entry_or_null(&nd->queue, struct request, queuelist); + if (rq) { list_del_init(&rq->queuelist); elv_dispatch_sort(q, rq); return 1; @@ -46,7 +46,7 @@ noop_former_request(struct request_queue *q, struct request *rq) if (rq->queuelist.prev == &nd->queue) return NULL; - return list_entry(rq->queuelist.prev, struct request, queuelist); + return list_prev_entry(rq, queuelist); } static struct request * @@ -56,7 +56,7 @@ noop_latter_request(struct request_queue *q, struct request *rq) if (rq->queuelist.next == &nd->queue) return NULL; - return list_entry(rq->queuelist.next, struct request, queuelist); + return list_next_entry(rq, queuelist); } static int noop_init_queue(struct request_queue *q, struct elevator_type *e) |