aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-07-23 13:56:02 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-23 13:56:02 -0400
commit141d3b27fc4b4f97ca6d9b5c1cc8aeeab967dcfc (patch)
treea18a56300378d1ea62bdb4dbcb7240f1bac4e6a3 /drivers/ide/ide-cd.c
parent570f89ea5f3ee93756dc2293b83bdfedb8d35348 (diff)
ide: ide-cd.c fix sparse endianness warnings
drivers/ide/ide-cd.c:1276:46: warning: Using plain integer as NULL pointer drivers/ide/ide-cd.c:1298:19: warning: cast to restricted __be32 drivers/ide/ide-cd.c:1300:4: warning: cast to restricted __be32 drivers/ide/ide-cd.c:1522:14: warning: cast to restricted __le16 drivers/ide/ide-cd.c:1523:14: warning: cast to restricted __le16 drivers/ide/ide-cd.c:1525:14: warning: cast to restricted __be16 drivers/ide/ide-cd.c:1526:14: warning: cast to restricted __be16 drivers/ide/ide-cd.c:1667:37: warning: cast to restricted __be16 Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Acked-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 52fe3b95dc92..4e73aeee4053 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1284,7 +1284,7 @@ int cdrom_check_status(ide_drive_t *drive, struct request_sense *sense)
1284 */ 1284 */
1285 cmd[7] = cdi->sanyo_slot % 3; 1285 cmd[7] = cdi->sanyo_slot % 3;
1286 1286
1287 return ide_cd_queue_pc(drive, cmd, 0, NULL, 0, sense, 0, REQ_QUIET); 1287 return ide_cd_queue_pc(drive, cmd, 0, NULL, NULL, sense, 0, REQ_QUIET);
1288} 1288}
1289 1289
1290static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity, 1290static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity,
@@ -1292,8 +1292,8 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity,
1292 struct request_sense *sense) 1292 struct request_sense *sense)
1293{ 1293{
1294 struct { 1294 struct {
1295 __u32 lba; 1295 __be32 lba;
1296 __u32 blocklen; 1296 __be32 blocklen;
1297 } capbuf; 1297 } capbuf;
1298 1298
1299 int stat; 1299 int stat;
@@ -1526,15 +1526,12 @@ void ide_cdrom_update_speed(ide_drive_t *drive, u8 *buf)
1526 struct cdrom_info *cd = drive->driver_data; 1526 struct cdrom_info *cd = drive->driver_data;
1527 u16 curspeed, maxspeed; 1527 u16 curspeed, maxspeed;
1528 1528
1529 curspeed = *(u16 *)&buf[8 + 14];
1530 maxspeed = *(u16 *)&buf[8 + 8];
1531
1532 if (drive->atapi_flags & IDE_AFLAG_LE_SPEED_FIELDS) { 1529 if (drive->atapi_flags & IDE_AFLAG_LE_SPEED_FIELDS) {
1533 curspeed = le16_to_cpu(curspeed); 1530 curspeed = le16_to_cpup((__le16 *)&buf[8 + 14]);
1534 maxspeed = le16_to_cpu(maxspeed); 1531 maxspeed = le16_to_cpup((__le16 *)&buf[8 + 8]);
1535 } else { 1532 } else {
1536 curspeed = be16_to_cpu(curspeed); 1533 curspeed = be16_to_cpup((__be16 *)&buf[8 + 14]);
1537 maxspeed = be16_to_cpu(maxspeed); 1534 maxspeed = be16_to_cpup((__be16 *)&buf[8 + 8]);
1538 } 1535 }
1539 1536
1540 cd->current_speed = (curspeed + (176/2)) / 176; 1537 cd->current_speed = (curspeed + (176/2)) / 176;
@@ -1675,7 +1672,7 @@ static int ide_cdrom_probe_capabilities(ide_drive_t *drive)
1675 else 1672 else
1676 printk(KERN_CONT " drive"); 1673 printk(KERN_CONT " drive");
1677 1674
1678 printk(KERN_CONT ", %dkB Cache\n", be16_to_cpu(*(u16 *)&buf[8 + 12])); 1675 printk(KERN_CONT ", %dkB Cache\n", be16_to_cpup((__be16 *)&buf[8 + 12]));
1679 1676
1680 return nslots; 1677 return nslots;
1681} 1678}