diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/atiixp.c | 8 | ||||
-rw-r--r-- | drivers/ide/ide-disk.c | 4 | ||||
-rw-r--r-- | drivers/ide/ide-park.c | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/drivers/ide/atiixp.c b/drivers/ide/atiixp.c index dbd0f242ec1..76650e92db4 100644 --- a/drivers/ide/atiixp.c +++ b/drivers/ide/atiixp.c @@ -19,12 +19,12 @@ #define ATIIXP_IDE_UDMA_CONTROL 0x54 #define ATIIXP_IDE_UDMA_MODE 0x56 -typedef struct { +struct atiixp_ide_timing { u8 command_width; u8 recover_width; -} atiixp_ide_timing; +}; -static atiixp_ide_timing pio_timing[] = { +static struct atiixp_ide_timing pio_timing[] = { { 0x05, 0x0d }, { 0x04, 0x07 }, { 0x03, 0x04 }, @@ -32,7 +32,7 @@ static atiixp_ide_timing pio_timing[] = { { 0x02, 0x00 }, }; -static atiixp_ide_timing mdma_timing[] = { +static struct atiixp_ide_timing mdma_timing[] = { { 0x07, 0x07 }, { 0x02, 0x01 }, { 0x02, 0x00 }, diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index ee880382e3b..56b9708894a 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c @@ -685,8 +685,10 @@ static void ide_disk_setup(ide_drive_t *drive) printk(KERN_INFO "%s: max request size: %dKiB\n", drive->name, queue_max_sectors(q) / 2); - if (ata_id_is_ssd(id)) + if (ata_id_is_ssd(id)) { queue_flag_set_unlocked(QUEUE_FLAG_NONROT, q); + queue_flag_clear_unlocked(QUEUE_FLAG_ADD_RANDOM, q); + } /* calculate drive capacity, and select LBA if possible */ ide_disk_get_capacity(drive); diff --git a/drivers/ide/ide-park.c b/drivers/ide/ide-park.c index f41558a0bcd..ca958604cda 100644 --- a/drivers/ide/ide-park.c +++ b/drivers/ide/ide-park.c @@ -46,7 +46,7 @@ static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout) * timeout has expired, so power management will be reenabled. */ rq = blk_get_request(q, READ, GFP_NOWAIT); - if (unlikely(!rq)) + if (IS_ERR(rq)) goto out; rq->cmd[0] = REQ_UNPARK_HEADS; |