summaryrefslogtreecommitdiffstats
path: root/sys/dev/scd/scd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/scd/scd.c')
-rw-r--r--sys/dev/scd/scd.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c
index 1124bff..15be673 100644
--- a/sys/dev/scd/scd.c
+++ b/sys/dev/scd/scd.c
@@ -130,7 +130,7 @@ static int scd_resume(struct scd_softc *);
static int scd_playtracks(struct scd_softc *, struct ioc_play_track *pt);
static int scd_playmsf(struct scd_softc *, struct ioc_play_msf *msf);
static int scd_play(struct scd_softc *, struct ioc_play_msf *msf);
-static int scd_subchan(struct scd_softc *, struct ioc_read_subchannel *sch, int nocopyout);
+static int scd_subchan(struct scd_softc *, struct ioc_read_subchannel *sch);
static int read_subcode(struct scd_softc *, struct sony_subchannel_position_data *sch);
/* for xcdplayer */
@@ -357,10 +357,8 @@ scdioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *t
case CDIOCPLAYMSF:
error = scd_playmsf(sc, (struct ioc_play_msf *) addr);
break;
- case CDIOCREADSUBCHANNEL_SYSSPACE:
- return scd_subchan(sc, (struct ioc_read_subchannel *) addr, 1);
case CDIOCREADSUBCHANNEL:
- return scd_subchan(sc, (struct ioc_read_subchannel *) addr, 0);
+ return scd_subchan(sc, (struct ioc_read_subchannel *) addr);
case CDIOREADTOCHEADER:
error = scd_toc_header (sc, (struct ioc_toc_header *) addr);
break;
@@ -564,7 +562,7 @@ scd_eject(struct scd_softc *sc)
}
static int
-scd_subchan(struct scd_softc *sc, struct ioc_read_subchannel *sch, int nocopyout)
+scd_subchan(struct scd_softc *sc, struct ioc_read_subchannel *sch)
{
struct sony_subchannel_position_data q;
struct cd_sub_channel_info data;
@@ -594,12 +592,8 @@ scd_subchan(struct scd_softc *sc, struct ioc_read_subchannel *sch, int nocopyout
data.what.position.absaddr.msf.frame = bcd2bin(q.abs_msf[2]);
SCD_UNLOCK(sc);
- if (nocopyout == 0) {
- if (copyout(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len))!=0)
- return (EFAULT);
- } else {
- bcopy(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len));
- }
+ if (copyout(&data, sch->data, min(sizeof(struct cd_sub_channel_info), sch->data_len))!=0)
+ return (EFAULT);
return (0);
}
OpenPOWER on IntegriCloud