Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / drivers / ide / ide-lib.c
index b09a653..c1fd20c 100644 (file)
@@ -1,4 +1,3 @@
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/string.h>
@@ -164,8 +163,7 @@ u8 ide_rate_filter (u8 mode, u8 speed)
 //     printk("%s: mode 0x%02x, speed 0x%02x\n", __FUNCTION__, mode, speed);
 
        /* So that we remember to update this if new modes appear */
-       if (mode > 4)
-               BUG();
+       BUG_ON(mode > 4);
        return min(speed, speed_max[mode]);
 #else /* !CONFIG_BLK_DEV_IDEDMA */
        return min(speed, (u8)XFER_PIO_4);
@@ -486,7 +484,7 @@ static u8 ide_dump_ata_status(ide_drive_t *drive, const char *msg, u8 stat)
        unsigned long flags;
        u8 err = 0;
 
-       local_irq_set(flags);
+       local_irq_save(flags);
        printk("%s: %s: status=0x%02x { ", drive->name, msg, stat);
        if (stat & BUSY_STAT)
                printk("Busy ");
@@ -568,7 +566,7 @@ static u8 ide_dump_atapi_status(ide_drive_t *drive, const char *msg, u8 stat)
 
        status.all = stat;
        error.all = 0;
-       local_irq_set(flags);
+       local_irq_save(flags);
        printk("%s: %s: status=0x%02x { ", drive->name, msg, stat);
        if (status.b.bsy)
                printk("Busy ");