From: Bartlomiej Zolnierkiewicz Date: Fri, 1 Feb 2008 22:09:27 +0000 (+0100) Subject: ide-cd: unify moving to the next buffer in cdrom_rw_intr() X-Git-Tag: v2.6.25-rc1~1078^2~46 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=37782fcefcca437f870e581e6cc316111f8b7660;p=linux-2.6-omap-h63xx.git ide-cd: unify moving to the next buffer in cdrom_rw_intr() Use the fact that for the first loop rq->current_nr_sectors is always set and unify moving to the next buffer for read/write requests. There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz --- diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 4b395e015e7..0f17117c5aa 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1302,13 +1302,6 @@ static ide_startstop_t cdrom_rw_intr(ide_drive_t *drive) while (sectors_to_transfer > 0) { int this_transfer; - /* - * If we've filled the present buffer but there's another - * chained buffer after it, move on. - */ - if (!write && rq->current_nr_sectors == 0 && rq->nr_sectors) - cdrom_end_request(drive, 1); - if (!rq->current_nr_sectors) { if (!write) /* @@ -1342,7 +1335,7 @@ static ide_startstop_t cdrom_rw_intr(ide_drive_t *drive) /* * current buffer complete, move on */ - if (write && rq->current_nr_sectors == 0 && rq->nr_sectors) + if (rq->current_nr_sectors == 0 && rq->nr_sectors) cdrom_end_request(drive, 1); }