struct cdrom_ti *ti = (struct cdrom_ti *)arg; 
struct cdrom_ti *ti = arg; 
int ide_cdrom_audio_ioctl (struct cdrom_device_info *cdi,			   unsigned int cmd, void *arg)			   {	ide_drive_t *drive = (ide_drive_t*) cdi->handle;	struct cdrom_info *info = drive->driver_data;	int stat;	switch (cmd) {	/*	 * emulate PLAY_AUDIO_TI command with PLAY_AUDIO_10, since	 * atapi doesn't support it	 */	case CDROMPLAYTRKIND: {		unsigned long lba_start, lba_end;		struct cdrom_ti *ti = (struct cdrom_ti *)arg;		struct atapi_toc_entry *first_toc, *last_toc;		stat = cdrom_get_toc_entry(drive, ti->cdti_trk0, &first_toc);		if (stat)			return stat;		stat = cdrom_get_toc_entry(drive, ti->cdti_trk1, &last_toc);		if (stat)			return stat;		if (ti->cdti_trk1 != CDROM_LEADOUT)			++last_toc;		lba_start = first_toc->addr.lba;		lba_end   = last_toc->addr.lba;		if (lba_end <= lba_start)			return -EINVAL;		return cdrom_play_audio(drive, lba_start, lba_end);	}	case CDROMREADTOCHDR: {		struct cdrom_tochdr *tochdr = (struct cdrom_tochdr *) arg;		struct atapi_toc *toc;		/* Make sure our saved TOC is valid. */		stat = cdrom_read_toc(drive, NULL);		if (stat) return stat;		toc = info->toc;		tochdr->cdth_trk0 = toc->hdr.first_track;		tochdr->cdth_trk1 = toc->hdr.last_track;		return 0;	}	case CDROMREADTOCENTRY: {		struct cdrom_tocentry *tocentry = (struct cdrom_tocentry*) arg;		struct atapi_toc_entry *toce;		stat = cdrom_get_toc_entry(drive, tocentry->cdte_track, &toce);		if (stat) return stat;		tocentry->cdte_ctrl = toce->control;		tocentry->cdte_adr  = toce->adr;		if (tocentry->cdte_format == CDROM_MSF) {			lba_to_msf (toce->addr.lba,				   &tocentry->cdte_addr.msf.minute,				   &tocentry->cdte_addr.msf.second,				   &tocentry->cdte_addr.msf.frame);		} else			tocentry->cdte_addr.lba = toce->addr.lba;		return 0;	}	default:		return -EINVAL;	}}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/2a91f3e54ff27c6002597f689ba51c5fa657ddbd/ide-cd.c/buggy/drivers/ide/ide-cd.c