diff options
author | Borislav Petkov <bbpetkov@yahoo.de> | 2008-02-02 13:56:33 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-02-02 13:56:33 -0500 |
commit | 0078df2ece5a752e878410e39eb31e075183b4e7 (patch) | |
tree | 2b410536cd44acba8853e29bfe041595f86fefce /drivers/ide/ide-floppy.c | |
parent | 8f6224308bb5642506af62b88e1b38582220524d (diff) |
ide-floppy: remove unnecessary ->handler != NULL check
This BUG_ON is unneeded since the ->handler != NULL check is performed in
ide_set_handler().
Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r-- | drivers/ide/ide-floppy.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index e63758a78969..66dfd1811101 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -794,7 +794,7 @@ static ide_startstop_t idefloppy_pc_intr (ide_drive_t *drive) | |||
794 | "to send us more data than expected " | 794 | "to send us more data than expected " |
795 | "- discarding data\n"); | 795 | "- discarding data\n"); |
796 | idefloppy_discard_data(drive, bcount); | 796 | idefloppy_discard_data(drive, bcount); |
797 | BUG_ON(HWGROUP(drive)->handler != NULL); | 797 | |
798 | ide_set_handler(drive, | 798 | ide_set_handler(drive, |
799 | &idefloppy_pc_intr, | 799 | &idefloppy_pc_intr, |
800 | IDEFLOPPY_WAIT_CMD, | 800 | IDEFLOPPY_WAIT_CMD, |
@@ -825,7 +825,6 @@ static ide_startstop_t idefloppy_pc_intr (ide_drive_t *drive) | |||
825 | pc->actually_transferred += bcount; | 825 | pc->actually_transferred += bcount; |
826 | pc->current_position += bcount; | 826 | pc->current_position += bcount; |
827 | 827 | ||
828 | BUG_ON(HWGROUP(drive)->handler != NULL); | ||
829 | ide_set_handler(drive, &idefloppy_pc_intr, IDEFLOPPY_WAIT_CMD, NULL); /* And set the interrupt handler again */ | 828 | ide_set_handler(drive, &idefloppy_pc_intr, IDEFLOPPY_WAIT_CMD, NULL); /* And set the interrupt handler again */ |
830 | return ide_started; | 829 | return ide_started; |
831 | } | 830 | } |
@@ -852,7 +851,7 @@ static ide_startstop_t idefloppy_transfer_pc (ide_drive_t *drive) | |||
852 | "issuing a packet command\n"); | 851 | "issuing a packet command\n"); |
853 | return ide_do_reset(drive); | 852 | return ide_do_reset(drive); |
854 | } | 853 | } |
855 | BUG_ON(HWGROUP(drive)->handler != NULL); | 854 | |
856 | /* Set the interrupt routine */ | 855 | /* Set the interrupt routine */ |
857 | ide_set_handler(drive, &idefloppy_pc_intr, IDEFLOPPY_WAIT_CMD, NULL); | 856 | ide_set_handler(drive, &idefloppy_pc_intr, IDEFLOPPY_WAIT_CMD, NULL); |
858 | /* Send the actual packet */ | 857 | /* Send the actual packet */ |
@@ -908,7 +907,7 @@ static ide_startstop_t idefloppy_transfer_pc1 (ide_drive_t *drive) | |||
908 | * 40 and 50msec work well. idefloppy_pc_intr will not be actually | 907 | * 40 and 50msec work well. idefloppy_pc_intr will not be actually |
909 | * used until after the packet is moved in about 50 msec. | 908 | * used until after the packet is moved in about 50 msec. |
910 | */ | 909 | */ |
911 | BUG_ON(HWGROUP(drive)->handler != NULL); | 910 | |
912 | ide_set_handler(drive, | 911 | ide_set_handler(drive, |
913 | &idefloppy_pc_intr, /* service routine for packet command */ | 912 | &idefloppy_pc_intr, /* service routine for packet command */ |
914 | floppy->ticks, /* wait this long before "failing" */ | 913 | floppy->ticks, /* wait this long before "failing" */ |