aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-floppy.c
diff options
context:
space:
mode:
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);