diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-12-24 09:23:43 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-12-24 09:23:43 -0500 |
commit | aa5dc8ebd9ef7521461b1b47ec918be841a21313 (patch) | |
tree | a043cf7df8be60c2de8b61942ecb34919ee58d2c /drivers/ide | |
parent | 3cbd814ef3d4c80392377e6ce5816058258f1484 (diff) |
ide-cd: fix ACER/AOpen 24X CDROM speed reporting on big-endian machines
* Fix ACER/AOpen 24X CDROM speed reporting on big-endian machines
by adding missing le16_to_cpu() calls.
While at it:
* Replace ntohs() by be16_to_cpu().
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-cd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 249834b024f5..97ce584fde79 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -2688,14 +2688,14 @@ void ide_cdrom_update_speed (ide_drive_t *drive, struct atapi_capabilities_page | |||
2688 | if (!drive->id->model[0] && | 2688 | if (!drive->id->model[0] && |
2689 | !strncmp(drive->id->fw_rev, "241N", 4)) { | 2689 | !strncmp(drive->id->fw_rev, "241N", 4)) { |
2690 | CDROM_STATE_FLAGS(drive)->current_speed = | 2690 | CDROM_STATE_FLAGS(drive)->current_speed = |
2691 | (((unsigned int)cap->curspeed) + (176/2)) / 176; | 2691 | (le16_to_cpu(cap->curspeed) + (176/2)) / 176; |
2692 | CDROM_CONFIG_FLAGS(drive)->max_speed = | 2692 | CDROM_CONFIG_FLAGS(drive)->max_speed = |
2693 | (((unsigned int)cap->maxspeed) + (176/2)) / 176; | 2693 | (le16_to_cpu(cap->maxspeed) + (176/2)) / 176; |
2694 | } else { | 2694 | } else { |
2695 | CDROM_STATE_FLAGS(drive)->current_speed = | 2695 | CDROM_STATE_FLAGS(drive)->current_speed = |
2696 | (ntohs(cap->curspeed) + (176/2)) / 176; | 2696 | (be16_to_cpu(cap->curspeed) + (176/2)) / 176; |
2697 | CDROM_CONFIG_FLAGS(drive)->max_speed = | 2697 | CDROM_CONFIG_FLAGS(drive)->max_speed = |
2698 | (ntohs(cap->maxspeed) + (176/2)) / 176; | 2698 | (be16_to_cpu(cap->maxspeed) + (176/2)) / 176; |
2699 | } | 2699 | } |
2700 | } | 2700 | } |
2701 | 2701 | ||