Commit 30e88d01 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Takashi Iwai
Browse files

isa: Make the remove callback for isa drivers return void



The driver core ignores the return value of the remove callback, so
don't give isa drivers the chance to provide a value.

Adapt all isa_drivers with a remove callbacks accordingly; they all
return 0 unconditionally anyhow.

Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> # for drivers/net/can/sja1000/tscan1.c
Acked-by: default avatarWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Acked-by: Wolfram Sang <wsa@kernel.org> # for drivers/i2c/
Reviewed-by: Takashi Iway <tiwai@suse.de> # for sound/
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> # for drivers/media/
Signed-off-by: default avatarUwe Kleine-König <uwe@kleine-koenig.org>
Link: https://lore.kernel.org/r/20210122092449.426097-4-uwe@kleine-koenig.org


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 7797b4e0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ static int isa_bus_remove(struct device *dev)
	struct isa_driver *isa_driver = dev->platform_data;

	if (isa_driver && isa_driver->remove)
		return isa_driver->remove(dev, to_isa_dev(dev)->id);
		isa_driver->remove(dev, to_isa_dev(dev)->id);

	return 0;
}
+1 −3
Original line number Diff line number Diff line
@@ -282,7 +282,7 @@ static int elektor_probe(struct device *dev, unsigned int id)
	return -ENODEV;
}

static int elektor_remove(struct device *dev, unsigned int id)
static void elektor_remove(struct device *dev, unsigned int id)
{
	i2c_del_adapter(&pcf_isa_ops);

@@ -298,8 +298,6 @@ static int elektor_remove(struct device *dev, unsigned int id)
		iounmap(base_iomem);
		release_mem_region(base, 2);
	}

	return 0;
}

static struct isa_driver i2c_elektor_driver = {
+1 −3
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ static int pca_isa_probe(struct device *dev, unsigned int id)
	return -ENODEV;
}

static int pca_isa_remove(struct device *dev, unsigned int id)
static void pca_isa_remove(struct device *dev, unsigned int id)
{
	i2c_del_adapter(&pca_isa_ops);

@@ -170,8 +170,6 @@ static int pca_isa_remove(struct device *dev, unsigned int id)
		free_irq(irq, &pca_isa_ops);
	}
	release_region(base, IO_SIZE);

	return 0;
}

static struct isa_driver pca_isa_driver = {
+1 −3
Original line number Diff line number Diff line
@@ -171,7 +171,7 @@ static int htcpen_isa_probe(struct device *dev, unsigned int id)
	return err;
}

static int htcpen_isa_remove(struct device *dev, unsigned int id)
static void htcpen_isa_remove(struct device *dev, unsigned int id)
{
	struct input_dev *htcpen_dev = dev_get_drvdata(dev);

@@ -182,8 +182,6 @@ static int htcpen_isa_remove(struct device *dev, unsigned int id)
	release_region(HTCPEN_PORT_INDEX, 2);
	release_region(HTCPEN_PORT_INIT, 1);
	release_region(HTCPEN_PORT_IRQ_CLEAR, 1);

	return 0;
}

#ifdef CONFIG_PM
+1 −3
Original line number Diff line number Diff line
@@ -337,13 +337,11 @@ int radio_isa_probe(struct device *pdev, unsigned int dev)
}
EXPORT_SYMBOL_GPL(radio_isa_probe);

int radio_isa_remove(struct device *pdev, unsigned int dev)
void radio_isa_remove(struct device *pdev, unsigned int dev)
{
	struct radio_isa_card *isa = dev_get_drvdata(pdev);

	radio_isa_common_remove(isa, isa->drv->region_size);

	return 0;
}
EXPORT_SYMBOL_GPL(radio_isa_remove);

Loading