Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82103
b: refs/heads/master
c: a1bb945
h: refs/heads/master
i:
  82101: 3370632
  82099: a1bb387
  82095: 63fee5f
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Feb 1, 2008
1 parent 7444521 commit d555c14
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5c68429dfe8256c6069555e5851838f8e3175f78
refs/heads/master: a1bb9457f06439f22571e93bddcca63144a08296
6 changes: 0 additions & 6 deletions trunk/drivers/cdrom/cdrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -2787,12 +2787,6 @@ int cdrom_ioctl(struct file * file, struct cdrom_device_info *cdi,
return -ENOSYS;
}

static inline
int msf_to_lba(char m, char s, char f)
{
return (((m * CD_SECS) + s) * CD_FRAMES + f) - CD_MSF_OFFSET;
}

/*
* Required when we need to use READ_10 to issue other than 2048 block
* reads
Expand Down
18 changes: 0 additions & 18 deletions trunk/drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1664,24 +1664,6 @@ void msf_from_bcd (struct atapi_msf *msf)
msf->frame = BCD2BIN(msf->frame);
}

static inline
void lba_to_msf (int lba, byte *m, byte *s, byte *f)
{
lba += CD_MSF_OFFSET;
lba &= 0xffffff; /* negative lbas use only 24 bits */
*m = lba / (CD_SECS * CD_FRAMES);
lba %= (CD_SECS * CD_FRAMES);
*s = lba / CD_FRAMES;
*f = lba % CD_FRAMES;
}


static inline
int msf_to_lba (byte m, byte s, byte f)
{
return (((m * CD_SECS) + s) * CD_FRAMES + f) - CD_MSF_OFFSET;
}

static int cdrom_check_status(ide_drive_t *drive, struct request_sense *sense)
{
struct request req;
Expand Down
14 changes: 14 additions & 0 deletions trunk/include/linux/cdrom.h
Original file line number Diff line number Diff line change
Expand Up @@ -1187,6 +1187,20 @@ struct media_event_desc {

extern int cdrom_get_media_event(struct cdrom_device_info *cdi, struct media_event_desc *med);

static inline void lba_to_msf(int lba, u8 *m, u8 *s, u8 *f)
{
lba += CD_MSF_OFFSET;
lba &= 0xffffff; /* negative lbas use only 24 bits */
*m = lba / (CD_SECS * CD_FRAMES);
lba %= (CD_SECS * CD_FRAMES);
*s = lba / CD_FRAMES;
*f = lba % CD_FRAMES;
}

static inline int msf_to_lba(u8 m, u8 s, u8 f)
{
return (((m * CD_SECS) + s) * CD_FRAMES + f) - CD_MSF_OFFSET;
}
#endif /* End of kernel only stuff */

#endif /* _LINUX_CDROM_H */

0 comments on commit d555c14

Please sign in to comment.