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

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

staging: comedi: addi_common.c: remove i_ADDI_Detach()



The addi_apci_035 and addi_apci_1500 are the only drivers left that use
this function in addi_common.c. Remove the function an add a private
comedi_driver (*detach) function to those 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 8e89ba5b
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -265,10 +265,3 @@ static int addi_auto_attach(struct comedi_device *dev,
	i_ADDI_Reset(dev);
	return 0;
}

static void i_ADDI_Detach(struct comedi_device *dev)
{
	if (dev->iobase)
		i_ADDI_Reset(dev);
	comedi_pci_detach(dev);
}
+8 −1
Original line number Diff line number Diff line
@@ -45,11 +45,18 @@ static int apci035_auto_attach(struct comedi_device *dev,
	return addi_auto_attach(dev, context);
}

static void apci035_detach(struct comedi_device *dev)
{
	if (dev->iobase)
		i_ADDI_Reset(dev);
	comedi_pci_detach(dev);
}

static struct comedi_driver apci035_driver = {
	.driver_name	= "addi_apci_035",
	.module		= THIS_MODULE,
	.auto_attach	= apci035_auto_attach,
	.detach		= i_ADDI_Detach,
	.detach		= apci035_detach,
};

static int apci035_pci_probe(struct pci_dev *dev,
+8 −1
Original line number Diff line number Diff line
@@ -44,11 +44,18 @@ static int apci1500_auto_attach(struct comedi_device *dev,
	return addi_auto_attach(dev, context);
}

static void apci1500_detach(struct comedi_device *dev)
{
	if (dev->iobase)
		i_ADDI_Reset(dev);
	comedi_pci_detach(dev);
}

static struct comedi_driver apci1500_driver = {
	.driver_name	= "addi_apci_1500",
	.module		= THIS_MODULE,
	.auto_attach	= apci1500_auto_attach,
	.detach		= i_ADDI_Detach,
	.detach		= apci1500_detach,
};

static int apci1500_pci_probe(struct pci_dev *dev,