aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-floppy.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-07-16 14:33:47 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-16 14:33:47 -0400
commit85ae98a3dff2da860a4f8f9e4a0de69ad82ce633 (patch)
tree1c88464f0a1ddbc1d3db0792ef4525c9d1d7c9c2 /drivers/ide/ide-floppy.c
parent68dc3575e064a5655cbd656fbf32d6ceeb85ac9e (diff)
ide: endian annotations in ide-floppy.c
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Al Viro <viro@ZenIV.linux.org.uk> Cc: Borislav Petkov <petkovbb@googlemail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r--drivers/ide/ide-floppy.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 00948c39822b..c7e4433fcbcf 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -702,10 +702,10 @@ static int ide_floppy_get_flexible_disk_page(ide_drive_t *drive)
702 set_disk_ro(floppy->disk, floppy->wp); 702 set_disk_ro(floppy->disk, floppy->wp);
703 page = &pc.buf[8]; 703 page = &pc.buf[8];
704 704
705 transfer_rate = be16_to_cpu(*(u16 *)&pc.buf[8 + 2]); 705 transfer_rate = be16_to_cpup((__be16 *)&pc.buf[8 + 2]);
706 sector_size = be16_to_cpu(*(u16 *)&pc.buf[8 + 6]); 706 sector_size = be16_to_cpup((__be16 *)&pc.buf[8 + 6]);
707 cyls = be16_to_cpu(*(u16 *)&pc.buf[8 + 8]); 707 cyls = be16_to_cpup((__be16 *)&pc.buf[8 + 8]);
708 rpm = be16_to_cpu(*(u16 *)&pc.buf[8 + 28]); 708 rpm = be16_to_cpup((__be16 *)&pc.buf[8 + 28]);
709 heads = pc.buf[8 + 4]; 709 heads = pc.buf[8 + 4];
710 sectors = pc.buf[8 + 5]; 710 sectors = pc.buf[8 + 5];
711 711
@@ -780,8 +780,8 @@ static int ide_floppy_get_capacity(ide_drive_t *drive)
780 for (i = 0; i < desc_cnt; i++) { 780 for (i = 0; i < desc_cnt; i++) {
781 unsigned int desc_start = 4 + i*8; 781 unsigned int desc_start = 4 + i*8;
782 782
783 blocks = be32_to_cpu(*(u32 *)&pc.buf[desc_start]); 783 blocks = be32_to_cpup((__be32 *)&pc.buf[desc_start]);
784 length = be16_to_cpu(*(u16 *)&pc.buf[desc_start + 6]); 784 length = be16_to_cpup((__be16 *)&pc.buf[desc_start + 6]);
785 785
786 debug_log("Descriptor %d: %dkB, %d blocks, %d sector size\n", 786 debug_log("Descriptor %d: %dkB, %d blocks, %d sector size\n",
787 i, blocks * length / 1024, blocks, length); 787 i, blocks * length / 1024, blocks, length);
@@ -902,8 +902,8 @@ static int ide_floppy_get_format_capacities(ide_drive_t *drive, int __user *arg)
902 if (u_index >= u_array_size) 902 if (u_index >= u_array_size)
903 break; /* User-supplied buffer too small */ 903 break; /* User-supplied buffer too small */
904 904
905 blocks = be32_to_cpu(*(u32 *)&pc.buf[desc_start]); 905 blocks = be32_to_cpup((__be32 *)&pc.buf[desc_start]);
906 length = be16_to_cpu(*(u16 *)&pc.buf[desc_start + 6]); 906 length = be16_to_cpup((__be16 *)&pc.buf[desc_start + 6]);
907 907
908 if (put_user(blocks, argp)) 908 if (put_user(blocks, argp))
909 return(-EFAULT); 909 return(-EFAULT);