diff options
Diffstat (limited to 'drivers/ide/pci/siimage.c')
-rw-r--r-- | drivers/ide/pci/siimage.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index db2b88a369ab..7b5bd8729f64 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
@@ -223,7 +223,9 @@ static u8 sil_pata_udma_filter(ide_drive_t *drive) | |||
223 | 223 | ||
224 | static u8 sil_sata_udma_filter(ide_drive_t *drive) | 224 | static u8 sil_sata_udma_filter(ide_drive_t *drive) |
225 | { | 225 | { |
226 | return strstr(drive->id->model, "Maxtor") ? ATA_UDMA5 : ATA_UDMA6; | 226 | char *m = (char *)&drive->id[ATA_ID_PROD]; |
227 | |||
228 | return strstr(m, "Maxtor") ? ATA_UDMA5 : ATA_UDMA6; | ||
227 | } | 229 | } |
228 | 230 | ||
229 | /** | 231 | /** |
@@ -616,8 +618,8 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) | |||
616 | 618 | ||
617 | static int is_dev_seagate_sata(ide_drive_t *drive) | 619 | static int is_dev_seagate_sata(ide_drive_t *drive) |
618 | { | 620 | { |
619 | const char *s = &drive->id->model[0]; | 621 | const char *s = (const char *)&drive->id[ATA_ID_PROD]; |
620 | unsigned len = strnlen(s, sizeof(drive->id->model)); | 622 | unsigned len = strnlen(s, ATA_ID_PROD_LEN); |
621 | 623 | ||
622 | if ((len > 4) && (!memcmp(s, "ST", 2))) | 624 | if ((len > 4) && (!memcmp(s, "ST", 2))) |
623 | if ((!memcmp(s + len - 2, "AS", 2)) || | 625 | if ((!memcmp(s + len - 2, "AS", 2)) || |