]> err.no Git - linux-2.6/commitdiff
ide-cd: use bcd2bin/bin2bcd
authorAdrian Bunk <bunk@kernel.org>
Mon, 18 Aug 2008 19:40:04 +0000 (21:40 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Mon, 18 Aug 2008 19:40:04 +0000 (21:40 +0200)
Change ide-cd to use the new bcd2bin/bin2bcd functions instead of the
obsolete BCD2BIN/BIN2BCD macros.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-cd.c

index 89a112d513adc9fb9e1ccf2cf2d4c8a818eea675..49a8c589e346c15982e158e5116c9fd930aa9b46 100644 (file)
@@ -1272,9 +1272,9 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq,
  */
 static void msf_from_bcd(struct atapi_msf *msf)
 {
-       msf->minute = BCD2BIN(msf->minute);
-       msf->second = BCD2BIN(msf->second);
-       msf->frame  = BCD2BIN(msf->frame);
+       msf->minute = bcd2bin(msf->minute);
+       msf->second = bcd2bin(msf->second);
+       msf->frame  = bcd2bin(msf->frame);
 }
 
 int cdrom_check_status(ide_drive_t *drive, struct request_sense *sense)
@@ -1415,8 +1415,8 @@ int ide_cd_read_toc(ide_drive_t *drive, struct request_sense *sense)
                return stat;
 
        if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD) {
-               toc->hdr.first_track = BCD2BIN(toc->hdr.first_track);
-               toc->hdr.last_track  = BCD2BIN(toc->hdr.last_track);
+               toc->hdr.first_track = bcd2bin(toc->hdr.first_track);
+               toc->hdr.last_track  = bcd2bin(toc->hdr.last_track);
        }
 
        ntracks = toc->hdr.last_track - toc->hdr.first_track + 1;
@@ -1456,8 +1456,8 @@ int ide_cd_read_toc(ide_drive_t *drive, struct request_sense *sense)
                        return stat;
 
                if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD) {
-                       toc->hdr.first_track = (u8)BIN2BCD(CDROM_LEADOUT);
-                       toc->hdr.last_track = (u8)BIN2BCD(CDROM_LEADOUT);
+                       toc->hdr.first_track = (u8)bin2bcd(CDROM_LEADOUT);
+                       toc->hdr.last_track = (u8)bin2bcd(CDROM_LEADOUT);
                } else {
                        toc->hdr.first_track = CDROM_LEADOUT;
                        toc->hdr.last_track = CDROM_LEADOUT;
@@ -1470,14 +1470,14 @@ int ide_cd_read_toc(ide_drive_t *drive, struct request_sense *sense)
        toc->hdr.toc_length = be16_to_cpu(toc->hdr.toc_length);
 
        if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD) {
-               toc->hdr.first_track = BCD2BIN(toc->hdr.first_track);
-               toc->hdr.last_track  = BCD2BIN(toc->hdr.last_track);
+               toc->hdr.first_track = bcd2bin(toc->hdr.first_track);
+               toc->hdr.last_track  = bcd2bin(toc->hdr.last_track);
        }
 
        for (i = 0; i <= ntracks; i++) {
                if (drive->atapi_flags & IDE_AFLAG_TOCADDR_AS_BCD) {
                        if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD)
-                               toc->ent[i].track = BCD2BIN(toc->ent[i].track);
+                               toc->ent[i].track = bcd2bin(toc->ent[i].track);
                        msf_from_bcd(&toc->ent[i].addr.msf);
                }
                toc->ent[i].addr.lba = msf_to_lba(toc->ent[i].addr.msf.minute,