View | Details | Raw Unified | Return to bug 26188
Collapse All | Expand All

(-)mpu.c (-1 / +3 lines)
Lines 358-363 Link Here
358
358
359
	DEB(printf("mpu: attaching.\n"));
359
	DEB(printf("mpu: attaching.\n"));
360
360
361
	mtx_init(&scp->mtx, "mpumid", MTX_DEF);
362
361
	/* Allocate the resources, switch to uart mode. */
363
	/* Allocate the resources, switch to uart mode. */
362
	if (mpu_allocres(scp, dev) || mpu_uartmode(scp)) {
364
	if (mpu_allocres(scp, dev) || mpu_uartmode(scp)) {
363
		mpu_releaseres(scp, dev);
365
		mpu_releaseres(scp, dev);
Lines 368-374 Link Here
368
370
369
	/* Fill the softc. */
371
	/* Fill the softc. */
370
	scp->dev = dev;
372
	scp->dev = dev;
371
	mtx_init(&scp->mtx, "mpumid", MTX_DEF);
372
	scp->devinfo = devinfo = create_mididev_info_unit(MDT_MIDI, &mpu_op_desc, &midisynth_op_desc);
373
	scp->devinfo = devinfo = create_mididev_info_unit(MDT_MIDI, &mpu_op_desc, &midisynth_op_desc);
373
374
374
	/* Fill the midi info. */
375
	/* Fill the midi info. */
Lines 751-756 Link Here
751
		bus_release_resource(dev, SYS_RES_IOPORT, scp->io_rid, scp->io);
752
		bus_release_resource(dev, SYS_RES_IOPORT, scp->io_rid, scp->io);
752
		scp->io = NULL;
753
		scp->io = NULL;
753
	}
754
	}
755
	mtx_destroy(&scp->mtx);
754
}
756
}
755
757
756
static device_method_t mpu_methods[] = {
758
static device_method_t mpu_methods[] = {

Return to bug 26188