Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aa5dc8ebd9ef7521461b1b47ec918be841a21313 Commit: aa5dc8ebd9ef7521461b1b47ec918be841a21313 Parent: 3cbd814ef3d4c80392377e6ce5816058258f1484 Author: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> AuthorDate: Mon Dec 24 15:23:43 2007 +0100 Committer: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> CommitDate: Mon Dec 24 15:23:43 2007 +0100
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 <[EMAIL PROTECTED]> Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> --- 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 249834b..97ce584 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 if (!drive->id->model[0] && !strncmp(drive->id->fw_rev, "241N", 4)) { CDROM_STATE_FLAGS(drive)->current_speed = - (((unsigned int)cap->curspeed) + (176/2)) / 176; + (le16_to_cpu(cap->curspeed) + (176/2)) / 176; CDROM_CONFIG_FLAGS(drive)->max_speed = - (((unsigned int)cap->maxspeed) + (176/2)) / 176; + (le16_to_cpu(cap->maxspeed) + (176/2)) / 176; } else { CDROM_STATE_FLAGS(drive)->current_speed = - (ntohs(cap->curspeed) + (176/2)) / 176; + (be16_to_cpu(cap->curspeed) + (176/2)) / 176; CDROM_CONFIG_FLAGS(drive)->max_speed = - (ntohs(cap->maxspeed) + (176/2)) / 176; + (be16_to_cpu(cap->maxspeed) + (176/2)) / 176; } } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html