aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-tape.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 1e1f26331a24..2d822df08658 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -2746,9 +2746,8 @@ static void idetape_setup(ide_drive_t *drive, idetape_tape_t *tape, int minor)
2746 * Ensure that the number we got makes sense; limit it within 2746 * Ensure that the number we got makes sense; limit it within
2747 * IDETAPE_DSC_RW_MIN and IDETAPE_DSC_RW_MAX. 2747 * IDETAPE_DSC_RW_MIN and IDETAPE_DSC_RW_MAX.
2748 */ 2748 */
2749 tape->best_dsc_rw_freq = max_t(unsigned long, 2749 tape->best_dsc_rw_freq = clamp_t(unsigned long, t, IDETAPE_DSC_RW_MIN,
2750 min_t(unsigned long, t, IDETAPE_DSC_RW_MAX), 2750 IDETAPE_DSC_RW_MAX);
2751 IDETAPE_DSC_RW_MIN);
2752 printk(KERN_INFO "ide-tape: %s <-> %s: %dKBps, %d*%dkB buffer, " 2751 printk(KERN_INFO "ide-tape: %s <-> %s: %dKBps, %d*%dkB buffer, "
2753 "%lums tDSC%s\n", 2752 "%lums tDSC%s\n",
2754 drive->name, tape->name, *(u16 *)&tape->caps[14], 2753 drive->name, tape->name, *(u16 *)&tape->caps[14],