Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a32c6d00 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: drivers: use comedi_legacy_detach()



Use comedi_legacy_detach() to release the I/O region requested
by these drivers.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3fd19714
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -262,8 +262,7 @@ static int aio_aio12_8_attach(struct comedi_device *dev,
static void aio_aio12_8_detach(struct comedi_device *dev)
{
	comedi_spriv_free(dev, 2);
	if (dev->iobase)
		release_region(dev->iobase, 24);
	comedi_legacy_detach(dev);
}

static struct comedi_driver aio_aio12_8_driver = {
+1 −2
Original line number Diff line number Diff line
@@ -547,8 +547,7 @@ static void pc236_detach(struct comedi_device *dev)
		free_irq(dev->irq, dev);
	comedi_spriv_free(dev, 0);
	if (is_isa_board(thisboard)) {
		if (dev->iobase)
			release_region(dev->iobase, PC236_IO_SIZE);
		comedi_legacy_detach(dev);
	} else if (is_pci_board(thisboard)) {
		struct pci_dev *pcidev = comedi_to_pci_dev(dev);
		comedi_pci_disable(dev);
+1 −2
Original line number Diff line number Diff line
@@ -468,8 +468,7 @@ static int c6xdigio_attach(struct comedi_device *dev,

static void c6xdigio_detach(struct comedi_device *dev)
{
	if (dev->iobase)
		release_region(dev->iobase, C6XDIGIO_SIZE);
	comedi_legacy_detach(dev);
	pnp_unregister_driver(&c6xdigio_pnp_driver);
}

+1 −2
Original line number Diff line number Diff line
@@ -340,10 +340,9 @@ static int parport_attach(struct comedi_device *dev,

static void parport_detach(struct comedi_device *dev)
{
	if (dev->iobase)
		release_region(dev->iobase, PARPORT_SIZE);
	if (dev->irq)
		free_irq(dev->irq, dev);
	comedi_legacy_detach(dev);
}

static struct comedi_driver parport_driver = {
+1 −4
Original line number Diff line number Diff line
@@ -195,11 +195,8 @@ static int das08_isa_attach(struct comedi_device *dev,

static void das08_isa_detach(struct comedi_device *dev)
{
	const struct das08_board_struct *thisboard = comedi_board(dev);

	das08_common_detach(dev);
	if (dev->iobase)
		release_region(dev->iobase, thisboard->iosize);
	comedi_legacy_detach(dev);
}

static struct comedi_driver das08_isa_driver = {
Loading