diff options
author | Borislav Petkov <petkovbb@googlemail.com> | 2008-07-16 14:33:46 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-16 14:33:46 -0400 |
commit | 4b01fcbbe69bba34a8494fca6376ac0804f0f51d (patch) | |
tree | 440a8b9939520dfe95c4dc4cc8ef205de66d7eff /drivers/ide/ide-cd.c | |
parent | b6ca440a8ff15e12478ea6f026a52970e7a0c54c (diff) |
ide-cd: fold cdrom_start_seek into ide_cd_do_request
Do what the compiler does anyway: inline a function that is used only once.
This saves us the overhead of a function call and the function is small enough
to be embedded in the callsite anyways.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r-- | drivers/ide/ide-cd.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index b61ce5ee08e2..66d82c1b16eb 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -753,14 +753,6 @@ static ide_startstop_t cdrom_start_seek_continuation(ide_drive_t *drive) | |||
753 | return cdrom_transfer_packet_command(drive, rq, &cdrom_seek_intr); | 753 | return cdrom_transfer_packet_command(drive, rq, &cdrom_seek_intr); |
754 | } | 754 | } |
755 | 755 | ||
756 | static void cdrom_start_seek(ide_drive_t *drive) | ||
757 | { | ||
758 | struct cdrom_info *info = drive->driver_data; | ||
759 | |||
760 | info->dma = 0; | ||
761 | info->start_seek = jiffies; | ||
762 | } | ||
763 | |||
764 | /* | 756 | /* |
765 | * Fix up a possibly partially-processed request so that we can start it over | 757 | * Fix up a possibly partially-processed request so that we can start it over |
766 | * entirely, or even put it back on the request queue. | 758 | * entirely, or even put it back on the request queue. |
@@ -1219,7 +1211,8 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq, | |||
1219 | drive->dsc_overlap) { | 1211 | drive->dsc_overlap) { |
1220 | xferlen = 0; | 1212 | xferlen = 0; |
1221 | fn = cdrom_start_seek_continuation; | 1213 | fn = cdrom_start_seek_continuation; |
1222 | cdrom_start_seek(drive); | 1214 | info->dma = 0; |
1215 | info->start_seek = jiffies; | ||
1223 | } else { | 1216 | } else { |
1224 | xferlen = 32768; | 1217 | xferlen = 32768; |
1225 | fn = cdrom_start_rw_cont; | 1218 | fn = cdrom_start_rw_cont; |