diff options
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r-- | drivers/ide/ide.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 772451600e4d..8d3fab33a3c7 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -328,7 +328,7 @@ int set_using_dma(ide_drive_t *drive, int arg) | |||
328 | if (arg < 0 || arg > 1) | 328 | if (arg < 0 || arg > 1) |
329 | return -EINVAL; | 329 | return -EINVAL; |
330 | 330 | ||
331 | if (!drive->id || !(drive->id->capability & 1)) | 331 | if ((drive->driveid->capability & 1) == 0) |
332 | goto out; | 332 | goto out; |
333 | 333 | ||
334 | if (hwif->dma_ops == NULL) | 334 | if (hwif->dma_ops == NULL) |
@@ -710,21 +710,21 @@ static ssize_t model_show(struct device *dev, struct device_attribute *attr, | |||
710 | char *buf) | 710 | char *buf) |
711 | { | 711 | { |
712 | ide_drive_t *drive = to_ide_device(dev); | 712 | ide_drive_t *drive = to_ide_device(dev); |
713 | return sprintf(buf, "%s\n", drive->id->model); | 713 | return sprintf(buf, "%s\n", (char *)&drive->id[ATA_ID_PROD]); |
714 | } | 714 | } |
715 | 715 | ||
716 | static ssize_t firmware_show(struct device *dev, struct device_attribute *attr, | 716 | static ssize_t firmware_show(struct device *dev, struct device_attribute *attr, |
717 | char *buf) | 717 | char *buf) |
718 | { | 718 | { |
719 | ide_drive_t *drive = to_ide_device(dev); | 719 | ide_drive_t *drive = to_ide_device(dev); |
720 | return sprintf(buf, "%s\n", drive->id->fw_rev); | 720 | return sprintf(buf, "%s\n", (char *)&drive->id[ATA_ID_FW_REV]); |
721 | } | 721 | } |
722 | 722 | ||
723 | static ssize_t serial_show(struct device *dev, struct device_attribute *attr, | 723 | static ssize_t serial_show(struct device *dev, struct device_attribute *attr, |
724 | char *buf) | 724 | char *buf) |
725 | { | 725 | { |
726 | ide_drive_t *drive = to_ide_device(dev); | 726 | ide_drive_t *drive = to_ide_device(dev); |
727 | return sprintf(buf, "%s\n", drive->id->serial_no); | 727 | return sprintf(buf, "%s\n", (char *)&drive->id[ATA_ID_SERNO]); |
728 | } | 728 | } |
729 | 729 | ||
730 | static struct device_attribute ide_dev_attrs[] = { | 730 | static struct device_attribute ide_dev_attrs[] = { |