bus: Make remove callback return void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 13 Jul 2021 19:35:22 +0000 (21:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jul 2021 09:53:42 +0000 (11:53 +0200)
The driver core ignores the return value of this callback because there
is only little it can do when a device disappears.

This is the final bit of a long lasting cleanup quest where several
buses were converted to also return void from their remove callback.
Additionally some resource leaks were fixed that were caused by drivers
returning an error code in the expectation that the driver won't go
away.

With struct bus_type::remove returning void it's prevented that newly
implemented buses return an ignored error code and so don't anticipate
wrong expectations for driver authors.

Reviewed-by: Tom Rix <trix@redhat.com> (For fpga)
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Cornelia Huck <cohuck@redhat.com> (For drivers/s390 and drivers/vfio)
Acked-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> (For ARM, Amba and related parts)
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Chen-Yu Tsai <wens@csie.org> (for sunxi-rsb)
Acked-by: Pali Rohár <pali@kernel.org>
Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org> (for media)
Acked-by: Hans de Goede <hdegoede@redhat.com> (For drivers/platform)
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-By: Vinod Koul <vkoul@kernel.org>
Acked-by: Juergen Gross <jgross@suse.com> (For xen)
Acked-by: Lee Jones <lee.jones@linaro.org> (For mfd)
Acked-by: Johannes Thumshirn <jth@kernel.org> (For mcb)
Acked-by: Johan Hovold <johan@kernel.org>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> (For slimbus)
Acked-by: Kirti Wankhede <kwankhede@nvidia.com> (For vfio)
Acked-by: Maximilian Luz <luzmaximilian@gmail.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> (For ulpi and typec)
Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> (For ipack)
Acked-by: Geoff Levand <geoff@infradead.org> (For ps3)
Acked-by: Yehezkel Bernat <YehezkelShB@gmail.com> (For thunderbolt)
Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> (For intel_th)
Acked-by: Dominik Brodowski <linux@dominikbrodowski.net> (For pcmcia)
Acked-by: Rafael J. Wysocki <rafael@kernel.org> (For ACPI)
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> (rpmsg and apr)
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> (For intel-ish-hid)
Acked-by: Dan Williams <dan.j.williams@intel.com> (For CXL, DAX, and NVDIMM)
Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> (For isa)
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (For firewire)
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> (For hid)
Acked-by: Thorsten Scherer <t.scherer@eckelmann.de> (For siox)
Acked-by: Sven Van Asbroeck <TheSven73@gmail.com> (For anybuss)
Acked-by: Ulf Hansson <ulf.hansson@linaro.org> (For MMC)
Acked-by: Wolfram Sang <wsa@kernel.org> # for I2C
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Finn Thain <fthain@linux-m68k.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20210713193522.1770306-6-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
86 files changed:
arch/arm/common/locomo.c
arch/arm/common/sa1111.c
arch/arm/mach-rpc/ecard.c
arch/mips/sgi-ip22/ip22-gio.c
arch/parisc/kernel/drivers.c
arch/powerpc/platforms/ps3/system-bus.c
arch/powerpc/platforms/pseries/ibmebus.c
arch/powerpc/platforms/pseries/vio.c
arch/sparc/kernel/vio.c
drivers/acpi/bus.c
drivers/amba/bus.c
drivers/base/auxiliary.c
drivers/base/isa.c
drivers/base/platform.c
drivers/bcma/main.c
drivers/bus/sunxi-rsb.c
drivers/cxl/core.c
drivers/dax/bus.c
drivers/dma/idxd/sysfs.c
drivers/firewire/core-device.c
drivers/firmware/arm_scmi/bus.c
drivers/firmware/google/coreboot_table.c
drivers/fpga/dfl.c
drivers/hid/hid-core.c
drivers/hid/intel-ish-hid/ishtp/bus.c
drivers/hv/vmbus_drv.c
drivers/hwtracing/intel_th/core.c
drivers/i2c/i2c-core-base.c
drivers/i3c/master.c
drivers/input/gameport/gameport.c
drivers/input/serio/serio.c
drivers/ipack/ipack.c
drivers/macintosh/macio_asic.c
drivers/mcb/mcb-core.c
drivers/media/pci/bt8xx/bttv-gpio.c
drivers/memstick/core/memstick.c
drivers/mfd/mcp-core.c
drivers/misc/mei/bus.c
drivers/misc/tifm_core.c
drivers/mmc/core/bus.c
drivers/mmc/core/sdio_bus.c
drivers/net/netdevsim/bus.c
drivers/ntb/core.c
drivers/ntb/ntb_transport.c
drivers/nubus/bus.c
drivers/nvdimm/bus.c
drivers/pci/endpoint/pci-epf-core.c
drivers/pci/pci-driver.c
drivers/pcmcia/ds.c
drivers/platform/surface/aggregator/bus.c
drivers/platform/x86/wmi.c
drivers/pnp/driver.c
drivers/rapidio/rio-driver.c
drivers/rpmsg/rpmsg_core.c
drivers/s390/cio/ccwgroup.c
drivers/s390/cio/css.c
drivers/s390/cio/device.c
drivers/s390/cio/scm.c
drivers/s390/crypto/ap_bus.c
drivers/scsi/scsi_debug.c
drivers/sh/superhyway/superhyway.c
drivers/siox/siox-core.c
drivers/slimbus/core.c
drivers/soc/qcom/apr.c
drivers/spi/spi.c
drivers/spmi/spmi.c
drivers/ssb/main.c
drivers/staging/fieldbus/anybuss/host.c
drivers/staging/greybus/gbphy.c
drivers/target/loopback/tcm_loop.c
drivers/thunderbolt/domain.c
drivers/tty/serdev/core.c
drivers/usb/common/ulpi.c
drivers/usb/serial/bus.c
drivers/usb/typec/bus.c
drivers/vdpa/vdpa.c
drivers/vfio/mdev/mdev_driver.c
drivers/virtio/virtio.c
drivers/vlynq/vlynq.c
drivers/vme/vme.c
drivers/xen/xenbus/xenbus.h
drivers/xen/xenbus/xenbus_probe.c
drivers/zorro/zorro-driver.c
include/linux/device/bus.h
sound/ac97/bus.c
sound/aoa/soundbus/core.c

index e45f4e4e06b698bd8ab142434a0f6df81d343ae1..24d21ba630305447d0ba03d07ae58c599c6eebbe 100644 (file)
@@ -834,14 +834,13 @@ static int locomo_bus_probe(struct device *dev)
        return ret;
 }
 
-static int locomo_bus_remove(struct device *dev)
+static void locomo_bus_remove(struct device *dev)
 {
        struct locomo_dev *ldev = LOCOMO_DEV(dev);
        struct locomo_driver *drv = LOCOMO_DRV(dev->driver);
 
        if (drv->remove)
                drv->remove(ldev);
-       return 0;
 }
 
 struct bus_type locomo_bus_type = {
index ff5e0d04cb89238933bd20dccb778e6a53c007c1..092a2ebc0c28c8712f64f73041e07055845bb499 100644 (file)
@@ -1364,15 +1364,13 @@ static int sa1111_bus_probe(struct device *dev)
        return ret;
 }
 
-static int sa1111_bus_remove(struct device *dev)
+static void sa1111_bus_remove(struct device *dev)
 {
        struct sa1111_dev *sadev = to_sa1111_device(dev);
        struct sa1111_driver *drv = SA1111_DRV(dev->driver);
 
        if (drv->remove)
                drv->remove(sadev);
-
-       return 0;
 }
 
 struct bus_type sa1111_bus_type = {
index 827b50f1c73e6dac648f8023f3dc009a69b8e287..53813f9464a2426494b844ba545f18fb89862863 100644 (file)
@@ -1052,7 +1052,7 @@ static int ecard_drv_probe(struct device *dev)
        return ret;
 }
 
-static int ecard_drv_remove(struct device *dev)
+static void ecard_drv_remove(struct device *dev)
 {
        struct expansion_card *ec = ECARD_DEV(dev);
        struct ecard_driver *drv = ECARD_DRV(dev->driver);
@@ -1067,8 +1067,6 @@ static int ecard_drv_remove(struct device *dev)
        ec->ops = &ecard_default_ops;
        barrier();
        ec->irq_data = NULL;
-
-       return 0;
 }
 
 /*
index de0768a49ee87833a921b4869793641d36272d75..dfc52f661ad068d065c2ca08992c3d929db5d9cd 100644 (file)
@@ -143,14 +143,13 @@ static int gio_device_probe(struct device *dev)
        return error;
 }
 
-static int gio_device_remove(struct device *dev)
+static void gio_device_remove(struct device *dev)
 {
        struct gio_device *gio_dev = to_gio_device(dev);
        struct gio_driver *drv = to_gio_driver(dev->driver);
 
        if (dev->driver && drv->remove)
                drv->remove(gio_dev);
-       return 0;
 }
 
 static void gio_device_shutdown(struct device *dev)
index 80fa0650736ba7f1363cd362b120a2afaba9fecb..776d624a7207b176bea75bf66c8eaac8363b8207 100644 (file)
@@ -133,14 +133,13 @@ static int parisc_driver_probe(struct device *dev)
        return rc;
 }
 
-static int __exit parisc_driver_remove(struct device *dev)
+static void __exit parisc_driver_remove(struct device *dev)
 {
        struct parisc_device *pa_dev = to_parisc_device(dev);
        struct parisc_driver *pa_drv = to_parisc_driver(dev->driver);
+
        if (pa_drv->remove)
                pa_drv->remove(pa_dev);
-
-       return 0;
 }
        
 
index 1a5665875165b7138282b109489c369eedd7b926..cc5774c64fae69c781bcbcf98839ad7f2855fbe0 100644 (file)
@@ -381,7 +381,7 @@ static int ps3_system_bus_probe(struct device *_dev)
        return result;
 }
 
-static int ps3_system_bus_remove(struct device *_dev)
+static void ps3_system_bus_remove(struct device *_dev)
 {
        struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
        struct ps3_system_bus_driver *drv;
@@ -399,7 +399,6 @@ static int ps3_system_bus_remove(struct device *_dev)
                        __func__, __LINE__, drv->core.name);
 
        pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, dev_name(&dev->core));
-       return 0;
 }
 
 static void ps3_system_bus_shutdown(struct device *_dev)
index c6c79ef55e138dc229e86689855977920adc8ea1..7ee3ed7d6cc211018773207d029735106f7c190f 100644 (file)
@@ -366,14 +366,13 @@ static int ibmebus_bus_device_probe(struct device *dev)
        return error;
 }
 
-static int ibmebus_bus_device_remove(struct device *dev)
+static void ibmebus_bus_device_remove(struct device *dev)
 {
        struct platform_device *of_dev = to_platform_device(dev);
        struct platform_driver *drv = to_platform_driver(dev->driver);
 
        if (dev->driver && drv->remove)
                drv->remove(of_dev);
-       return 0;
 }
 
 static void ibmebus_bus_device_shutdown(struct device *dev)
index e00f3725ec960624d6591d54b695ebde63449df4..58283cecbd52462387a5122390400cb6ec4464b2 100644 (file)
@@ -1257,7 +1257,7 @@ static int vio_bus_probe(struct device *dev)
 }
 
 /* convert from struct device to struct vio_dev and pass to driver. */
-static int vio_bus_remove(struct device *dev)
+static void vio_bus_remove(struct device *dev)
 {
        struct vio_dev *viodev = to_vio_dev(dev);
        struct vio_driver *viodrv = to_vio_driver(dev->driver);
@@ -1276,7 +1276,6 @@ static int vio_bus_remove(struct device *dev)
                vio_cmo_bus_remove(viodev);
 
        put_device(devptr);
-       return 0;
 }
 
 static void vio_bus_shutdown(struct device *dev)
index 348a886912198514474528c1125afb9ec9acf032..01122a208f9475c2a0936e194c55bcd95483d62e 100644 (file)
@@ -93,7 +93,7 @@ static int vio_device_probe(struct device *dev)
        return drv->probe(vdev, id);
 }
 
-static int vio_device_remove(struct device *dev)
+static void vio_device_remove(struct device *dev)
 {
        struct vio_dev *vdev = to_vio_dev(dev);
        struct vio_driver *drv = to_vio_driver(dev->driver);
@@ -107,8 +107,6 @@ static int vio_device_remove(struct device *dev)
 
                drv->remove(vdev);
        }
-
-       return 0;
 }
 
 static ssize_t devspec_show(struct device *dev,
index f854bcb8d01092e68a18c09d5ae808644eab72f8..b941555cb5e4ba4590deee42bbeabd084fd2e135 100644 (file)
@@ -1019,7 +1019,7 @@ static int acpi_device_probe(struct device *dev)
        return 0;
 }
 
-static int acpi_device_remove(struct device *dev)
+static void acpi_device_remove(struct device *dev)
 {
        struct acpi_device *acpi_dev = to_acpi_device(dev);
        struct acpi_driver *acpi_drv = acpi_dev->driver;
@@ -1034,7 +1034,6 @@ static int acpi_device_remove(struct device *dev)
        acpi_dev->driver_data = NULL;
 
        put_device(dev);
-       return 0;
 }
 
 struct bus_type acpi_bus_type = {
index 939ca220bf78d7cd931e1e31592b351b05407fe6..962041148482c7eb2115e3e9b67ac438a835b3d3 100644 (file)
@@ -219,7 +219,7 @@ static int amba_probe(struct device *dev)
        return ret;
 }
 
-static int amba_remove(struct device *dev)
+static void amba_remove(struct device *dev)
 {
        struct amba_device *pcdev = to_amba_device(dev);
        struct amba_driver *drv = to_amba_driver(dev->driver);
@@ -236,8 +236,6 @@ static int amba_remove(struct device *dev)
 
        amba_put_disable_pclk(pcdev);
        dev_pm_domain_detach(dev, true);
-
-       return 0;
 }
 
 static void amba_shutdown(struct device *dev)
index adc199dfba3cb3ff3e03ea3c98ae4645799fa442..0c86f5bed9f44d9c2ee8d4030f4ecbb2e1e6ad34 100644 (file)
@@ -79,7 +79,7 @@ static int auxiliary_bus_probe(struct device *dev)
        return ret;
 }
 
-static int auxiliary_bus_remove(struct device *dev)
+static void auxiliary_bus_remove(struct device *dev)
 {
        struct auxiliary_driver *auxdrv = to_auxiliary_drv(dev->driver);
        struct auxiliary_device *auxdev = to_auxiliary_dev(dev);
@@ -87,8 +87,6 @@ static int auxiliary_bus_remove(struct device *dev)
        if (auxdrv->remove)
                auxdrv->remove(auxdev);
        dev_pm_domain_detach(dev, true);
-
-       return 0;
 }
 
 static void auxiliary_bus_shutdown(struct device *dev)
index aa4737667026b0399c812985ec359d3f157d61af..55e3ee2da98f81fbf2d1b7a232727821328523a8 100644 (file)
@@ -46,14 +46,12 @@ static int isa_bus_probe(struct device *dev)
        return 0;
 }
 
-static int isa_bus_remove(struct device *dev)
+static void isa_bus_remove(struct device *dev)
 {
        struct isa_driver *isa_driver = dev->platform_data;
 
        if (isa_driver && isa_driver->remove)
                isa_driver->remove(dev, to_isa_dev(dev)->id);
-
-       return 0;
 }
 
 static void isa_bus_shutdown(struct device *dev)
index 8640578f45e9f1f0b7240a890a39ca9d0e15bff3..a94b7f4548814d6e340471b2479568b3db649d09 100644 (file)
@@ -1438,7 +1438,7 @@ out:
        return ret;
 }
 
-static int platform_remove(struct device *_dev)
+static void platform_remove(struct device *_dev)
 {
        struct platform_driver *drv = to_platform_driver(_dev->driver);
        struct platform_device *dev = to_platform_device(_dev);
@@ -1450,8 +1450,6 @@ static int platform_remove(struct device *_dev)
                        dev_warn(_dev, "remove callback returned a non-zero value. This will be ignored.\n");
        }
        dev_pm_domain_detach(_dev, true);
-
-       return 0;
 }
 
 static void platform_shutdown(struct device *_dev)
index 6535614a7dc13fbae815a9640b557ae516887ccf..e076630d17bd1df938e259d7a54a4f90714d3800 100644 (file)
@@ -27,7 +27,7 @@ static DEFINE_MUTEX(bcma_buses_mutex);
 
 static int bcma_bus_match(struct device *dev, struct device_driver *drv);
 static int bcma_device_probe(struct device *dev);
-static int bcma_device_remove(struct device *dev);
+static void bcma_device_remove(struct device *dev);
 static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env);
 
 static ssize_t manuf_show(struct device *dev, struct device_attribute *attr, char *buf)
@@ -614,7 +614,7 @@ static int bcma_device_probe(struct device *dev)
        return err;
 }
 
-static int bcma_device_remove(struct device *dev)
+static void bcma_device_remove(struct device *dev)
 {
        struct bcma_device *core = container_of(dev, struct bcma_device, dev);
        struct bcma_driver *adrv = container_of(dev->driver, struct bcma_driver,
@@ -623,8 +623,6 @@ static int bcma_device_remove(struct device *dev)
        if (adrv->remove)
                adrv->remove(core);
        put_device(dev);
-
-       return 0;
 }
 
 static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env)
index d46db132d08591409fd341be6818e44c57fda188..6f225dddc74f4becf1054e711fac9c94410a9836 100644 (file)
@@ -169,13 +169,11 @@ static int sunxi_rsb_device_probe(struct device *dev)
        return drv->probe(rdev);
 }
 
-static int sunxi_rsb_device_remove(struct device *dev)
+static void sunxi_rsb_device_remove(struct device *dev)
 {
        const struct sunxi_rsb_driver *drv = to_sunxi_rsb_driver(dev->driver);
 
        drv->remove(to_sunxi_rsb_device(dev));
-
-       return 0;
 }
 
 static struct bus_type sunxi_rsb_bus = {
index a2e4d54fc7bc4de77a4132ce6369d50938651a08..2b90b7c3b9d779c503d8c3acf22079a6c3eb0f70 100644 (file)
@@ -1034,13 +1034,12 @@ static int cxl_bus_probe(struct device *dev)
        return to_cxl_drv(dev->driver)->probe(dev);
 }
 
-static int cxl_bus_remove(struct device *dev)
+static void cxl_bus_remove(struct device *dev)
 {
        struct cxl_driver *cxl_drv = to_cxl_drv(dev->driver);
 
        if (cxl_drv->remove)
                cxl_drv->remove(dev);
-       return 0;
 }
 
 struct bus_type cxl_bus_type = {
index 5aee26e1bbd6dba393d8d33fe56c52cf9014fcfb..6cc4da4c713d903fde149e40ca03b44ae5988e86 100644 (file)
@@ -172,15 +172,13 @@ static int dax_bus_probe(struct device *dev)
        return 0;
 }
 
-static int dax_bus_remove(struct device *dev)
+static void dax_bus_remove(struct device *dev)
 {
        struct dax_device_driver *dax_drv = to_dax_drv(dev->driver);
        struct dev_dax *dev_dax = to_dev_dax(dev);
 
        if (dax_drv->remove)
                dax_drv->remove(dev_dax);
-
-       return 0;
 }
 
 static struct bus_type dax_bus_type = {
index 0460d58e3941fee2c8f2e03617fe5ec167aaa2df..5a017c62c7527f669e9c082960a3db19b7fbe4e1 100644 (file)
@@ -260,7 +260,7 @@ static void disable_wq(struct idxd_wq *wq)
        dev_info(dev, "wq %s disabled\n", dev_name(&wq->conf_dev));
 }
 
-static int idxd_config_bus_remove(struct device *dev)
+static void idxd_config_bus_remove(struct device *dev)
 {
        int rc;
 
@@ -305,8 +305,6 @@ static int idxd_config_bus_remove(struct device *dev)
                        dev_info(dev, "Device %s disabled\n", dev_name(dev));
 
        }
-
-       return 0;
 }
 
 static void idxd_config_bus_shutdown(struct device *dev)
index 68216988391f754314c4a1608ae481512eda7d22..90ed8fdaba754b5adb494f1cf294239618d5c788 100644 (file)
@@ -187,14 +187,12 @@ static int fw_unit_probe(struct device *dev)
        return driver->probe(fw_unit(dev), unit_match(dev, dev->driver));
 }
 
-static int fw_unit_remove(struct device *dev)
+static void fw_unit_remove(struct device *dev)
 {
        struct fw_driver *driver =
                        container_of(dev->driver, struct fw_driver, driver);
 
        driver->remove(fw_unit(dev));
-
-       return 0;
 }
 
 static int get_modalias(struct fw_unit *unit, char *buffer, size_t buffer_size)
index 6c7e24935eca58b4ce0e04c8a33f234078ae6284..f6fe723ab869e4836ee341d046585dd95a908220 100644 (file)
@@ -111,15 +111,13 @@ static int scmi_dev_probe(struct device *dev)
        return scmi_drv->probe(scmi_dev);
 }
 
-static int scmi_dev_remove(struct device *dev)
+static void scmi_dev_remove(struct device *dev)
 {
        struct scmi_driver *scmi_drv = to_scmi_driver(dev->driver);
        struct scmi_device *scmi_dev = to_scmi_dev(dev);
 
        if (scmi_drv->remove)
                scmi_drv->remove(scmi_dev);
-
-       return 0;
 }
 
 static struct bus_type scmi_bus_type = {
index dc83ea118c670d4c99fd234b32b25c1d4fef6a2c..c52bcaa9def60a3894486b1300cd05e054d92fc3 100644 (file)
@@ -44,15 +44,13 @@ static int coreboot_bus_probe(struct device *dev)
        return ret;
 }
 
-static int coreboot_bus_remove(struct device *dev)
+static void coreboot_bus_remove(struct device *dev)
 {
        struct coreboot_device *device = CB_DEV(dev);
        struct coreboot_driver *driver = CB_DRV(dev->driver);
 
        if (driver->remove)
                driver->remove(device);
-
-       return 0;
 }
 
 static struct bus_type coreboot_bus_type = {
index 511b20ff35a336c3f2a80107ebf8323359a86a0f..1ae6779a0dd66dc172479396b0c00ae4d84bac66 100644 (file)
@@ -284,15 +284,13 @@ static int dfl_bus_probe(struct device *dev)
        return ddrv->probe(ddev);
 }
 
-static int dfl_bus_remove(struct device *dev)
+static void dfl_bus_remove(struct device *dev)
 {
        struct dfl_driver *ddrv = to_dfl_drv(dev->driver);
        struct dfl_device *ddev = to_dfl_dev(dev);
 
        if (ddrv->remove)
                ddrv->remove(ddev);
-
-       return 0;
 }
 
 static int dfl_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
index 7db332139f7d5be9a1955cf070dbf08a027f03b7..dbed2524fd47bfe18ff0e64f5762f5e5a707220f 100644 (file)
@@ -2302,7 +2302,7 @@ end:
        return ret;
 }
 
-static int hid_device_remove(struct device *dev)
+static void hid_device_remove(struct device *dev)
 {
        struct hid_device *hdev = to_hid_device(dev);
        struct hid_driver *hdrv;
@@ -2322,8 +2322,6 @@ static int hid_device_remove(struct device *dev)
 
        if (!hdev->io_started)
                up(&hdev->driver_input_lock);
-
-       return 0;
 }
 
 static ssize_t modalias_show(struct device *dev, struct device_attribute *a,
index f0802b047ed8d2654783054d7c4e4d9911cb2ac8..8a51bd9cd09326e4f9026e7db846d01845e30d21 100644 (file)
@@ -255,7 +255,7 @@ static int ishtp_cl_bus_match(struct device *dev, struct device_driver *drv)
  *
  * Return: Return value from driver remove() call.
  */
-static int ishtp_cl_device_remove(struct device *dev)
+static void ishtp_cl_device_remove(struct device *dev)
 {
        struct ishtp_cl_device *device = to_ishtp_cl_device(dev);
        struct ishtp_cl_driver *driver = to_ishtp_cl_driver(dev->driver);
@@ -267,8 +267,6 @@ static int ishtp_cl_device_remove(struct device *dev)
 
        if (driver->remove)
                driver->remove(device);
-
-       return 0;
 }
 
 /**
index 57bbbaa4e8f7bda22b5b15f0d341cbd923e52990..392c1ac4f8193b3f04e31f57d262b326ba1490f5 100644 (file)
@@ -922,7 +922,7 @@ static int vmbus_probe(struct device *child_device)
 /*
  * vmbus_remove - Remove a vmbus device
  */
-static int vmbus_remove(struct device *child_device)
+static void vmbus_remove(struct device *child_device)
 {
        struct hv_driver *drv;
        struct hv_device *dev = device_to_hv_device(child_device);
@@ -932,11 +932,8 @@ static int vmbus_remove(struct device *child_device)
                if (drv->remove)
                        drv->remove(dev);
        }
-
-       return 0;
 }
 
-
 /*
  * vmbus_shutdown - Shutdown a vmbus device
  */
index 66eed2dff81840bce82633624f3aa69162d44e0d..7e753a75d23bbab5a6631d0b537c45db14c99570 100644 (file)
@@ -95,7 +95,7 @@ out_pm:
 
 static void intel_th_device_remove(struct intel_th_device *thdev);
 
-static int intel_th_remove(struct device *dev)
+static void intel_th_remove(struct device *dev)
 {
        struct intel_th_driver *thdrv = to_intel_th_driver(dev->driver);
        struct intel_th_device *thdev = to_intel_th_device(dev);
@@ -164,8 +164,6 @@ static int intel_th_remove(struct device *dev)
        pm_runtime_disable(dev);
        pm_runtime_set_active(dev);
        pm_runtime_enable(dev);
-
-       return 0;
 }
 
 static struct bus_type intel_th_bus = {
index 84f12bf90644acf72cb2c49281f48d3e8e8883b8..54964fbe3f0336630d3b6a410f45fae11d483cff 100644 (file)
@@ -601,7 +601,7 @@ put_sync_adapter:
        return status;
 }
 
-static int i2c_device_remove(struct device *dev)
+static void i2c_device_remove(struct device *dev)
 {
        struct i2c_client       *client = to_i2c_client(dev);
        struct i2c_adapter      *adap;
@@ -631,9 +631,6 @@ static int i2c_device_remove(struct device *dev)
        client->irq = 0;
        if (client->flags & I2C_CLIENT_HOST_NOTIFY)
                pm_runtime_put(&client->adapter->dev);
-
-       /* return always 0 because there is WIP to make remove-functions void */
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index e2e12a5585e516579f550406fa03e8d51da094c4..c3b4c677b4429e57b43d1f3a40d7145a87beef82 100644 (file)
@@ -322,7 +322,7 @@ static int i3c_device_probe(struct device *dev)
        return driver->probe(i3cdev);
 }
 
-static int i3c_device_remove(struct device *dev)
+static void i3c_device_remove(struct device *dev)
 {
        struct i3c_device *i3cdev = dev_to_i3cdev(dev);
        struct i3c_driver *driver = drv_to_i3cdrv(dev->driver);
@@ -331,8 +331,6 @@ static int i3c_device_remove(struct device *dev)
                driver->remove(i3cdev);
 
        i3c_device_free_ibi(i3cdev);
-
-       return 0;
 }
 
 struct bus_type i3c_bus_type = {
index 61fa7e724172109f8f7edb7f59039ef0c23fabe4..db58a01b23d33034e868963ef98f9bc18cbb4021 100644 (file)
@@ -697,13 +697,12 @@ static int gameport_driver_probe(struct device *dev)
        return gameport->drv ? 0 : -ENODEV;
 }
 
-static int gameport_driver_remove(struct device *dev)
+static void gameport_driver_remove(struct device *dev)
 {
        struct gameport *gameport = to_gameport_port(dev);
        struct gameport_driver *drv = to_gameport_driver(dev->driver);
 
        drv->disconnect(gameport);
-       return 0;
 }
 
 static void gameport_attach_driver(struct gameport_driver *drv)
index 29f491082926a3e317e601f2fe2c3f966b8b0126..ec117be3d8d8349baf0a6ef5913b7e01949e354a 100644 (file)
@@ -778,12 +778,11 @@ static int serio_driver_probe(struct device *dev)
        return serio_connect_driver(serio, drv);
 }
 
-static int serio_driver_remove(struct device *dev)
+static void serio_driver_remove(struct device *dev)
 {
        struct serio *serio = to_serio_port(dev);
 
        serio_disconnect_driver(serio);
-       return 0;
 }
 
 static void serio_cleanup(struct serio *serio)
index 7de9605cac4fdd30faae21dd660421f6e40efcd4..b1c3198355e7667f77cc7eba87c779eea81a535a 100644 (file)
@@ -67,15 +67,13 @@ static int ipack_bus_probe(struct device *device)
        return drv->ops->probe(dev);
 }
 
-static int ipack_bus_remove(struct device *device)
+static void ipack_bus_remove(struct device *device)
 {
        struct ipack_device *dev = to_ipack_dev(device);
        struct ipack_driver *drv = to_ipack_driver(device->driver);
 
        if (drv->ops->remove)
                drv->ops->remove(dev);
-
-       return 0;
 }
 
 static int ipack_uevent(struct device *dev, struct kobj_uevent_env *env)
index 49af60bdac9287d71f1d3facb70565c23c5f8e70..c1fdf289602160992803bb143b4dd492fa613f1d 100644 (file)
@@ -88,7 +88,7 @@ static int macio_device_probe(struct device *dev)
        return error;
 }
 
-static int macio_device_remove(struct device *dev)
+static void macio_device_remove(struct device *dev)
 {
        struct macio_dev * macio_dev = to_macio_device(dev);
        struct macio_driver * drv = to_macio_driver(dev->driver);
@@ -96,8 +96,6 @@ static int macio_device_remove(struct device *dev)
        if (dev->driver && drv->remove)
                drv->remove(macio_dev);
        macio_dev_put(macio_dev);
-
-       return 0;
 }
 
 static void macio_device_shutdown(struct device *dev)
index 38fbb3b5987318e8fcc83f1921164d2c8a10f849..edf4ee6eff25d58728b00036ccc67166266af3a6 100644 (file)
@@ -77,7 +77,7 @@ static int mcb_probe(struct device *dev)
        return ret;
 }
 
-static int mcb_remove(struct device *dev)
+static void mcb_remove(struct device *dev)
 {
        struct mcb_driver *mdrv = to_mcb_driver(dev->driver);
        struct mcb_device *mdev = to_mcb_device(dev);
@@ -89,8 +89,6 @@ static int mcb_remove(struct device *dev)
        module_put(carrier_mod);
 
        put_device(&mdev->dev);
-
-       return 0;
 }
 
 static void mcb_shutdown(struct device *dev)
index b730225ca8871be37d67974f5dd75021cd12eb5a..a2b18e2bed1b0bc00669a75936a0756953fb9a4d 100644 (file)
@@ -46,14 +46,13 @@ static int bttv_sub_probe(struct device *dev)
        return sub->probe ? sub->probe(sdev) : -ENODEV;
 }
 
-static int bttv_sub_remove(struct device *dev)
+static void bttv_sub_remove(struct device *dev)
 {
        struct bttv_sub_device *sdev = to_bttv_sub_dev(dev);
        struct bttv_sub_driver *sub = to_bttv_sub_drv(dev->driver);
 
        if (sub->remove)
                sub->remove(sdev);
-       return 0;
 }
 
 struct bus_type bttv_sub_bus_type = {
index bb1065990aebe5a87f1ec2de7fbaa7b47f1d5542..660df7d269fac2375466392b53374b6bba3aace1 100644 (file)
@@ -91,7 +91,7 @@ static int memstick_device_probe(struct device *dev)
        return rc;
 }
 
-static int memstick_device_remove(struct device *dev)
+static void memstick_device_remove(struct device *dev)
 {
        struct memstick_dev *card = container_of(dev, struct memstick_dev,
                                                  dev);
@@ -105,7 +105,6 @@ static int memstick_device_remove(struct device *dev)
        }
 
        put_device(dev);
-       return 0;
 }
 
 #ifdef CONFIG_PM
index eff9423e90f5db114ef97c732f74edebfa7c4960..2fa592c37c6f040ff4969411e0b13a2cacc5a0a7 100644 (file)
@@ -33,13 +33,12 @@ static int mcp_bus_probe(struct device *dev)
        return drv->probe(mcp);
 }
 
-static int mcp_bus_remove(struct device *dev)
+static void mcp_bus_remove(struct device *dev)
 {
        struct mcp *mcp = to_mcp(dev);
        struct mcp_driver *drv = to_mcp_driver(dev->driver);
 
        drv->remove(mcp);
-       return 0;
 }
 
 static struct bus_type mcp_bus_type = {
index 935acc6bbf3c6e6192b03a52ea22c5c0fd57c51a..3bf2bb4fd1524fb4312af4f65385920353acdcae 100644 (file)
@@ -884,7 +884,7 @@ static int mei_cl_device_probe(struct device *dev)
  *
  * Return:  0 on success; < 0 otherwise
  */
-static int mei_cl_device_remove(struct device *dev)
+static void mei_cl_device_remove(struct device *dev)
 {
        struct mei_cl_device *cldev = to_mei_cl_device(dev);
        struct mei_cl_driver *cldrv = to_mei_cl_driver(dev->driver);
@@ -896,8 +896,6 @@ static int mei_cl_device_remove(struct device *dev)
 
        mei_cl_bus_module_put(cldev);
        module_put(THIS_MODULE);
-
-       return 0;
 }
 
 static ssize_t name_show(struct device *dev, struct device_attribute *a,
index 667e574a7df2a45b72942ee50d5b7925e62b3a34..52656fc87e99dea8a00fb7c6f636693cd0ceb4a4 100644 (file)
@@ -87,7 +87,7 @@ static void tifm_dummy_event(struct tifm_dev *sock)
        return;
 }
 
-static int tifm_device_remove(struct device *dev)
+static void tifm_device_remove(struct device *dev)
 {
        struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev);
        struct tifm_driver *drv = container_of(dev->driver, struct tifm_driver,
@@ -101,7 +101,6 @@ static int tifm_device_remove(struct device *dev)
        }
 
        put_device(dev);
-       return 0;
 }
 
 #ifdef CONFIG_PM
index 4383c262b3f5a383a95a56cdf115571ae838118d..f6b7a9c5bbffd23ce5bc265a4a208a5b3b728bab 100644 (file)
@@ -140,14 +140,12 @@ static int mmc_bus_probe(struct device *dev)
        return drv->probe(card);
 }
 
-static int mmc_bus_remove(struct device *dev)
+static void mmc_bus_remove(struct device *dev)
 {
        struct mmc_driver *drv = to_mmc_driver(dev->driver);
        struct mmc_card *card = mmc_dev_to_card(dev);
 
        drv->remove(card);
-
-       return 0;
 }
 
 static void mmc_bus_shutdown(struct device *dev)
index 3d709029e07ce17679eb4de055d314caecd2bae8..fda03b35c14a57402b924fe901256fad97c80aef 100644 (file)
@@ -203,7 +203,7 @@ disable_runtimepm:
        return ret;
 }
 
-static int sdio_bus_remove(struct device *dev)
+static void sdio_bus_remove(struct device *dev)
 {
        struct sdio_driver *drv = to_sdio_driver(dev->driver);
        struct sdio_func *func = dev_to_sdio_func(dev);
@@ -232,8 +232,6 @@ static int sdio_bus_remove(struct device *dev)
                pm_runtime_put_sync(dev);
 
        dev_pm_domain_detach(dev, false);
-
-       return 0;
 }
 
 static const struct dev_pm_ops sdio_bus_pm_ops = {
index ccec29970d5b201c904bc5cb202b82581f56848f..14b15492953369996ba756341104cd2991206d96 100644 (file)
@@ -370,12 +370,11 @@ static int nsim_bus_probe(struct device *dev)
        return nsim_dev_probe(nsim_bus_dev);
 }
 
-static int nsim_bus_remove(struct device *dev)
+static void nsim_bus_remove(struct device *dev)
 {
        struct nsim_bus_dev *nsim_bus_dev = to_nsim_bus_dev(dev);
 
        nsim_dev_remove(nsim_bus_dev);
-       return 0;
 }
 
 static int nsim_num_vf(struct device *dev)
index f8f75a504a581f8321deb0cbbe3bd6f9b52426e2..27dd93deff6e561bea171f4695dbd8b975df6c0c 100644 (file)
@@ -271,7 +271,7 @@ static int ntb_probe(struct device *dev)
        return rc;
 }
 
-static int ntb_remove(struct device *dev)
+static void ntb_remove(struct device *dev)
 {
        struct ntb_dev *ntb;
        struct ntb_client *client;
@@ -283,8 +283,6 @@ static int ntb_remove(struct device *dev)
                client->ops.remove(client, ntb);
                put_device(dev);
        }
-
-       return 0;
 }
 
 static void ntb_dev_release(struct device *dev)
index 4a02561cfb965726c2fe2d73c9934f10adcbfb20..a9b97ebc71ac5b7b618f18c320250315a7801c35 100644 (file)
@@ -304,7 +304,7 @@ static int ntb_transport_bus_probe(struct device *dev)
        return rc;
 }
 
-static int ntb_transport_bus_remove(struct device *dev)
+static void ntb_transport_bus_remove(struct device *dev)
 {
        const struct ntb_transport_client *client;
 
@@ -312,8 +312,6 @@ static int ntb_transport_bus_remove(struct device *dev)
        client->remove(dev);
 
        put_device(dev);
-
-       return 0;
 }
 
 static struct bus_type ntb_transport_bus = {
index ad3d17c42e23ccef936430210b36e9e649034e01..d9d04f27f89b6e294469343396bfec0e0abfc337 100644 (file)
@@ -29,14 +29,12 @@ static int nubus_device_probe(struct device *dev)
        return err;
 }
 
-static int nubus_device_remove(struct device *dev)
+static void nubus_device_remove(struct device *dev)
 {
        struct nubus_driver *ndrv = to_nubus_driver(dev->driver);
-       int err = -ENODEV;
 
        if (dev->driver && ndrv->remove)
-               err = ndrv->remove(to_nubus_board(dev));
-       return err;
+               ndrv->remove(to_nubus_board(dev));
 }
 
 struct bus_type nubus_bus_type = {
index e6aa87043a959646920be9bff0ccfc94d0ce4830..9dc7f3edd42b17346304b6250fb16d24393bfa38 100644 (file)
@@ -108,7 +108,7 @@ static int nvdimm_bus_probe(struct device *dev)
        return rc;
 }
 
-static int nvdimm_bus_remove(struct device *dev)
+static void nvdimm_bus_remove(struct device *dev)
 {
        struct nd_device_driver *nd_drv = to_nd_device_driver(dev->driver);
        struct module *provider = to_bus_provider(dev);
@@ -123,7 +123,6 @@ static int nvdimm_bus_remove(struct device *dev)
        dev_dbg(&nvdimm_bus->dev, "%s.remove(%s)\n", dev->driver->name,
                        dev_name(dev));
        module_put(provider);
-       return 0;
 }
 
 static void nvdimm_bus_shutdown(struct device *dev)
index 4b9ad96bf1b26fd1da149583752a7e6334e9d94c..502eb79cd551668b115e53f5ae0d7477669728de 100644 (file)
@@ -387,7 +387,7 @@ static int pci_epf_device_probe(struct device *dev)
        return driver->probe(epf);
 }
 
-static int pci_epf_device_remove(struct device *dev)
+static void pci_epf_device_remove(struct device *dev)
 {
        struct pci_epf *epf = to_pci_epf(dev);
        struct pci_epf_driver *driver = to_pci_epf_driver(dev->driver);
@@ -395,8 +395,6 @@ static int pci_epf_device_remove(struct device *dev)
        if (driver->remove)
                driver->remove(epf);
        epf->driver = NULL;
-
-       return 0;
 }
 
 static struct bus_type pci_epf_bus_type = {
index 3a72352aa5cf8d4adcab83e989a29aa5675d255b..a0615395500a53a0c5f63d9ef419e5a53f347b17 100644 (file)
@@ -440,7 +440,7 @@ static int pci_device_probe(struct device *dev)
        return error;
 }
 
-static int pci_device_remove(struct device *dev)
+static void pci_device_remove(struct device *dev)
 {
        struct pci_dev *pci_dev = to_pci_dev(dev);
        struct pci_driver *drv = pci_dev->driver;
@@ -476,7 +476,6 @@ static int pci_device_remove(struct device *dev)
         */
 
        pci_dev_put(pci_dev);
-       return 0;
 }
 
 static void pci_device_shutdown(struct device *dev)
index bd81aa64d011b8839950e61f7c1e2a04563022be..5bd1b80424e7234388134836db6aff58f0108871 100644 (file)
@@ -350,7 +350,7 @@ static void pcmcia_card_remove(struct pcmcia_socket *s, struct pcmcia_device *le
        return;
 }
 
-static int pcmcia_device_remove(struct device *dev)
+static void pcmcia_device_remove(struct device *dev)
 {
        struct pcmcia_device *p_dev;
        struct pcmcia_driver *p_drv;
@@ -389,8 +389,6 @@ static int pcmcia_device_remove(struct device *dev)
        /* references from pcmcia_device_probe */
        pcmcia_put_dev(p_dev);
        module_put(p_drv->owner);
-
-       return 0;
 }
 
 
index 0169677c243e28c15fd5db3063819378fe825768..0a40dd9c94ed7fd91ec7846c90ecbb753e0ec5bc 100644 (file)
@@ -316,14 +316,12 @@ static int ssam_bus_probe(struct device *dev)
                ->probe(to_ssam_device(dev));
 }
 
-static int ssam_bus_remove(struct device *dev)
+static void ssam_bus_remove(struct device *dev)
 {
        struct ssam_device_driver *sdrv = to_ssam_device_driver(dev->driver);
 
        if (sdrv->remove)
                sdrv->remove(to_ssam_device(dev));
-
-       return 0;
 }
 
 struct bus_type ssam_bus_type = {
index 62e0d56a3332b294f0955ff20c5bd04b2fd38291..a76313006bdc4f83ba71592535009faecfb41422 100644 (file)
@@ -980,7 +980,7 @@ probe_failure:
        return ret;
 }
 
-static int wmi_dev_remove(struct device *dev)
+static void wmi_dev_remove(struct device *dev)
 {
        struct wmi_block *wblock = dev_to_wblock(dev);
        struct wmi_driver *wdriver =
@@ -997,8 +997,6 @@ static int wmi_dev_remove(struct device *dev)
 
        if (ACPI_FAILURE(wmi_method_enable(wblock, 0)))
                dev_warn(dev, "failed to disable device\n");
-
-       return 0;
 }
 
 static struct class wmi_bus_class = {
index c29d590c5e4ff68b3e077ddf94f6830abda3e6d8..cc6757dfa3f13e5cbb8feb087d0f8fd80f7b1651 100644 (file)
@@ -123,7 +123,7 @@ fail:
        return error;
 }
 
-static int pnp_device_remove(struct device *dev)
+static void pnp_device_remove(struct device *dev)
 {
        struct pnp_dev *pnp_dev = to_pnp_dev(dev);
        struct pnp_driver *drv = pnp_dev->driver;
@@ -139,7 +139,6 @@ static int pnp_device_remove(struct device *dev)
                pnp_disable_dev(pnp_dev);
 
        pnp_device_detach(pnp_dev);
-       return 0;
 }
 
 static void pnp_device_shutdown(struct device *dev)
index 72874153972ebde6568e9cdbba5c016d7375a580..a72bb0a40fcfe4fd976178769f85e04d52cf5a74 100644 (file)
@@ -112,7 +112,7 @@ static int rio_device_probe(struct device *dev)
  * driver, then run the driver remove() method.  Then update
  * the reference count.
  */
-static int rio_device_remove(struct device *dev)
+static void rio_device_remove(struct device *dev)
 {
        struct rio_dev *rdev = to_rio_dev(dev);
        struct rio_driver *rdrv = rdev->driver;
@@ -124,8 +124,6 @@ static int rio_device_remove(struct device *dev)
        }
 
        rio_dev_put(rdev);
-
-       return 0;
 }
 
 static void rio_device_shutdown(struct device *dev)
index c1404d3dae2c2d630558252aa0446b294ba1a78a..9151836190ce39f17b4e060a2092e7aa80669708 100644 (file)
@@ -530,14 +530,13 @@ out:
        return err;
 }
 
-static int rpmsg_dev_remove(struct device *dev)
+static void rpmsg_dev_remove(struct device *dev)
 {
        struct rpmsg_device *rpdev = to_rpmsg_device(dev);
        struct rpmsg_driver *rpdrv = to_rpmsg_driver(rpdev->dev.driver);
-       int err = 0;
 
        if (rpdev->ops->announce_destroy)
-               err = rpdev->ops->announce_destroy(rpdev);
+               rpdev->ops->announce_destroy(rpdev);
 
        if (rpdrv->remove)
                rpdrv->remove(rpdev);
@@ -546,8 +545,6 @@ static int rpmsg_dev_remove(struct device *dev)
 
        if (rpdev->ept)
                rpmsg_destroy_ept(rpdev->ept);
-
-       return err;
 }
 
 static struct bus_type rpmsg_bus = {
index a6aeab1ea0ae735cc0f033ae85f8194a3038a868..382c5b5f8cd39e38e678a594505921e73a952597 100644 (file)
@@ -439,15 +439,13 @@ module_exit(cleanup_ccwgroup);
 
 /************************** driver stuff ******************************/
 
-static int ccwgroup_remove(struct device *dev)
+static void ccwgroup_remove(struct device *dev)
 {
        struct ccwgroup_device *gdev = to_ccwgroupdev(dev);
        struct ccwgroup_driver *gdrv = to_ccwgroupdrv(dev->driver);
 
        if (gdrv->remove)
                gdrv->remove(gdev);
-
-       return 0;
 }
 
 static void ccwgroup_shutdown(struct device *dev)
index 092fd1ea57998139fe5327f75c62e23f441978e7..ebc321edba513f6d37dadd513831dc312cc2adbd 100644 (file)
@@ -1371,7 +1371,7 @@ static int css_probe(struct device *dev)
        return ret;
 }
 
-static int css_remove(struct device *dev)
+static void css_remove(struct device *dev)
 {
        struct subchannel *sch;
 
@@ -1379,8 +1379,6 @@ static int css_remove(struct device *dev)
        if (sch->driver->remove)
                sch->driver->remove(sch);
        sch->driver = NULL;
-
-       return 0;
 }
 
 static void css_shutdown(struct device *dev)
index cd5d2d4d8e46ad1bfc4b815ac4dcd6edd18108d5..adf33b653d87a0e7e0b9c7e6b5b2b5de23cc5343 100644 (file)
@@ -1741,7 +1741,7 @@ ccw_device_probe (struct device *dev)
        return 0;
 }
 
-static int ccw_device_remove(struct device *dev)
+static void ccw_device_remove(struct device *dev)
 {
        struct ccw_device *cdev = to_ccwdev(dev);
        struct ccw_driver *cdrv = cdev->drv;
@@ -1775,8 +1775,6 @@ static int ccw_device_remove(struct device *dev)
        spin_unlock_irq(cdev->ccwlock);
        io_subchannel_quiesce(sch);
        __disable_cmf(cdev);
-
-       return 0;
 }
 
 static void ccw_device_shutdown(struct device *dev)
index b31711307e5a8ec23e7de335c98d8d9038ca6514..b6b4589c70bd71d3470c82151b87308c620d3cb0 100644 (file)
@@ -28,15 +28,13 @@ static int scmdev_probe(struct device *dev)
        return scmdrv->probe ? scmdrv->probe(scmdev) : -ENODEV;
 }
 
-static int scmdev_remove(struct device *dev)
+static void scmdev_remove(struct device *dev)
 {
        struct scm_device *scmdev = to_scm_dev(dev);
        struct scm_driver *scmdrv = to_scm_drv(dev->driver);
 
        if (scmdrv->remove)
                scmdrv->remove(scmdev);
-
-       return 0;
 }
 
 static int scmdev_uevent(struct device *dev, struct kobj_uevent_env *env)
index 8d3a1d84a757562248ef7e2979532ae6911c8693..0992edcaf1af6cd4a7df8a909d647211ea33d4b7 100644 (file)
@@ -901,7 +901,7 @@ out:
        return rc;
 }
 
-static int ap_device_remove(struct device *dev)
+static void ap_device_remove(struct device *dev)
 {
        struct ap_device *ap_dev = to_ap_dev(dev);
        struct ap_driver *ap_drv = ap_dev->drv;
@@ -926,8 +926,6 @@ static int ap_device_remove(struct device *dev)
        ap_dev->drv = NULL;
 
        put_device(dev);
-
-       return 0;
 }
 
 struct ap_queue *ap_get_qdev(ap_qid_t qid)
index 5b3a20a140f9ed2d48b628cb75e7f99211cece94..58f69366bdccc3dfc2ef54613899297ec3bc5344 100644 (file)
@@ -7674,7 +7674,7 @@ static int sdebug_driver_probe(struct device *dev)
        return error;
 }
 
-static int sdebug_driver_remove(struct device *dev)
+static void sdebug_driver_remove(struct device *dev)
 {
        struct sdebug_host_info *sdbg_host;
        struct sdebug_dev_info *sdbg_devinfo, *tmp;
@@ -7691,7 +7691,6 @@ static int sdebug_driver_remove(struct device *dev)
        }
 
        scsi_host_put(sdbg_host->shost);
-       return 0;
 }
 
 static int pseudo_lld_bus_match(struct device *dev,
index 348836b90605f486521b2dc7f50b2db821a540f3..c0ab904c76ec6b0c2dcbcc8c7bf3db672010e340 100644 (file)
@@ -150,17 +150,13 @@ static int superhyway_device_probe(struct device *dev)
        return -ENODEV;
 }
 
-static int superhyway_device_remove(struct device *dev)
+static void superhyway_device_remove(struct device *dev)
 {
        struct superhyway_device *shyway_dev = to_superhyway_device(dev);
        struct superhyway_driver *shyway_drv = to_superhyway_driver(dev->driver);
 
-       if (shyway_drv && shyway_drv->remove) {
+       if (shyway_drv && shyway_drv->remove)
                shyway_drv->remove(shyway_dev);
-               return 0;
-       }
-
-       return -ENODEV;
 }
 
 /**
index 1794ff0106bc6df0e9a31dc87b6f2075e734044a..7c4f32d7696666702399022714dc7f8eff963c92 100644 (file)
@@ -520,7 +520,7 @@ static int siox_probe(struct device *dev)
        return sdriver->probe(sdevice);
 }
 
-static int siox_remove(struct device *dev)
+static void siox_remove(struct device *dev)
 {
        struct siox_driver *sdriver =
                container_of(dev->driver, struct siox_driver, driver);
@@ -528,8 +528,6 @@ static int siox_remove(struct device *dev)
 
        if (sdriver->remove)
                sdriver->remove(sdevice);
-
-       return 0;
 }
 
 static void siox_shutdown(struct device *dev)
index 1d2bc181da050193db624e7e4ca7de67fd25f994..78480e332ab8f5e7a342728238044aefb74a8a0e 100644 (file)
@@ -81,7 +81,7 @@ static int slim_device_probe(struct device *dev)
        return ret;
 }
 
-static int slim_device_remove(struct device *dev)
+static void slim_device_remove(struct device *dev)
 {
        struct slim_device *sbdev = to_slim_device(dev);
        struct slim_driver *sbdrv;
@@ -91,8 +91,6 @@ static int slim_device_remove(struct device *dev)
                if (sbdrv->remove)
                        sbdrv->remove(sbdev);
        }
-
-       return 0;
 }
 
 static int slim_device_uevent(struct device *dev, struct kobj_uevent_env *env)
index 7abfc8c4fdc7219403032631b643b13ad2828483..475a57b435b24176016c1f1d84dd2f70c7a28c0d 100644 (file)
@@ -217,7 +217,7 @@ static int apr_device_probe(struct device *dev)
        return adrv->probe(adev);
 }
 
-static int apr_device_remove(struct device *dev)
+static void apr_device_remove(struct device *dev)
 {
        struct apr_device *adev = to_apr_device(dev);
        struct apr_driver *adrv;
@@ -231,8 +231,6 @@ static int apr_device_remove(struct device *dev)
                idr_remove(&apr->svcs_idr, adev->svc_id);
                spin_unlock(&apr->svcs_lock);
        }
-
-       return 0;
 }
 
 static int apr_uevent(struct device *dev, struct kobj_uevent_env *env)
index c991811653211233c323685236b28066f7645664..ad2b558dc9cb66f58fa81d1e1435ac92aeab0acd 100644 (file)
@@ -405,7 +405,7 @@ static int spi_probe(struct device *dev)
        return ret;
 }
 
-static int spi_remove(struct device *dev)
+static void spi_remove(struct device *dev)
 {
        const struct spi_driver         *sdrv = to_spi_driver(dev->driver);
 
@@ -420,8 +420,6 @@ static int spi_remove(struct device *dev)
        }
 
        dev_pm_domain_detach(dev, true);
-
-       return 0;
 }
 
 static void spi_shutdown(struct device *dev)
index 51f5aeb65b3b20dd60bbf8cdf7852a973a180b8a..b37ead9e2fade912e17946864449b35f990737d8 100644 (file)
@@ -345,7 +345,7 @@ fail_probe:
        return err;
 }
 
-static int spmi_drv_remove(struct device *dev)
+static void spmi_drv_remove(struct device *dev)
 {
        const struct spmi_driver *sdrv = to_spmi_driver(dev->driver);
 
@@ -356,7 +356,6 @@ static int spmi_drv_remove(struct device *dev)
        pm_runtime_disable(dev);
        pm_runtime_set_suspended(dev);
        pm_runtime_put_noidle(dev);
-       return 0;
 }
 
 static void spmi_drv_shutdown(struct device *dev)
index 3a29b5570f9ff49bb5224abdb9897cc071e79648..8a93c83cb6f8056e55b4a6dd8560862705db9c67 100644 (file)
@@ -283,7 +283,7 @@ static void ssb_device_shutdown(struct device *dev)
                ssb_drv->shutdown(ssb_dev);
 }
 
-static int ssb_device_remove(struct device *dev)
+static void ssb_device_remove(struct device *dev)
 {
        struct ssb_device *ssb_dev = dev_to_ssb_dev(dev);
        struct ssb_driver *ssb_drv = drv_to_ssb_drv(dev->driver);
@@ -291,8 +291,6 @@ static int ssb_device_remove(struct device *dev)
        if (ssb_drv && ssb_drv->remove)
                ssb_drv->remove(ssb_dev);
        ssb_device_put(ssb_dev);
-
-       return 0;
 }
 
 static int ssb_device_probe(struct device *dev)
index 0f730efe9a6da69c2c72a6b6a833724981c1d1bc..8a75f6642c78335bdfc39b7536a47f3365ad5bd9 100644 (file)
@@ -1186,15 +1186,13 @@ static int anybus_bus_probe(struct device *dev)
        return adrv->probe(adev);
 }
 
-static int anybus_bus_remove(struct device *dev)
+static void anybus_bus_remove(struct device *dev)
 {
        struct anybuss_client_driver *adrv =
                to_anybuss_client_driver(dev->driver);
 
        if (adrv->remove)
                adrv->remove(to_anybuss_client(dev));
-
-       return 0;
 }
 
 static struct bus_type anybus_bus = {
index 13d319860da5cc9b6fea6c1b83982c25ddedcf3d..5a5c17a4519b3ffcb194a77c31c884ed12854784 100644 (file)
@@ -169,7 +169,7 @@ static int gbphy_dev_probe(struct device *dev)
        return ret;
 }
 
-static int gbphy_dev_remove(struct device *dev)
+static void gbphy_dev_remove(struct device *dev)
 {
        struct gbphy_driver *gbphy_drv = to_gbphy_driver(dev->driver);
        struct gbphy_device *gbphy_dev = to_gbphy_dev(dev);
@@ -180,8 +180,6 @@ static int gbphy_dev_remove(struct device *dev)
        pm_runtime_set_suspended(dev);
        pm_runtime_put_noidle(dev);
        pm_runtime_dont_use_autosuspend(dev);
-
-       return 0;
 }
 
 static struct bus_type gbphy_bus_type = {
index 6d0b0e67e79ec774bccdcd136c910c1bbc8ca193..cbb2118fb35ec358a75c2261fc8a07ed8d3fd4a4 100644 (file)
@@ -81,7 +81,7 @@ static int tcm_loop_show_info(struct seq_file *m, struct Scsi_Host *host)
 }
 
 static int tcm_loop_driver_probe(struct device *);
-static int tcm_loop_driver_remove(struct device *);
+static void tcm_loop_driver_remove(struct device *);
 
 static int pseudo_lld_bus_match(struct device *dev,
                                struct device_driver *dev_driver)
@@ -363,7 +363,7 @@ static int tcm_loop_driver_probe(struct device *dev)
        return 0;
 }
 
-static int tcm_loop_driver_remove(struct device *dev)
+static void tcm_loop_driver_remove(struct device *dev)
 {
        struct tcm_loop_hba *tl_hba;
        struct Scsi_Host *sh;
@@ -373,7 +373,6 @@ static int tcm_loop_driver_remove(struct device *dev)
 
        scsi_remove_host(sh);
        scsi_host_put(sh);
-       return 0;
 }
 
 static void tcm_loop_release_adapter(struct device *dev)
index a062befcb3b2c324df00b6755e8d130cccf33db2..7018d959f7758dcbbe4ddb7783936ac5dfe34977 100644 (file)
@@ -86,7 +86,7 @@ static int tb_service_probe(struct device *dev)
        return driver->probe(svc, id);
 }
 
-static int tb_service_remove(struct device *dev)
+static void tb_service_remove(struct device *dev)
 {
        struct tb_service *svc = tb_to_service(dev);
        struct tb_service_driver *driver;
@@ -94,8 +94,6 @@ static int tb_service_remove(struct device *dev)
        driver = container_of(dev->driver, struct tb_service_driver, driver);
        if (driver->remove)
                driver->remove(svc);
-
-       return 0;
 }
 
 static void tb_service_shutdown(struct device *dev)
index 9cdfcfe07e87c8f0278ca2c81769046f916a9d98..92498961fd92448caf4a9d96ad5ba4af23758c6b 100644 (file)
@@ -421,15 +421,13 @@ static int serdev_drv_probe(struct device *dev)
        return ret;
 }
 
-static int serdev_drv_remove(struct device *dev)
+static void serdev_drv_remove(struct device *dev)
 {
        const struct serdev_device_driver *sdrv = to_serdev_device_driver(dev->driver);
        if (sdrv->remove)
                sdrv->remove(to_serdev_device(dev));
 
        dev_pm_domain_detach(dev, true);
-
-       return 0;
 }
 
 static struct bus_type serdev_bus_type = {
index 7e13b74e60e5a758a5f38005e17610aacd601b00..4169cf40a03b59c79cf4d7520a9aec859c2b950e 100644 (file)
@@ -78,14 +78,12 @@ static int ulpi_probe(struct device *dev)
        return drv->probe(to_ulpi_dev(dev));
 }
 
-static int ulpi_remove(struct device *dev)
+static void ulpi_remove(struct device *dev)
 {
        struct ulpi_driver *drv = to_ulpi_driver(dev->driver);
 
        if (drv->remove)
                drv->remove(to_ulpi_dev(dev));
-
-       return 0;
 }
 
 static struct bus_type ulpi_bus = {
index 7133818a58b93b009c2664b19df3e6d39d222ba9..9e38142acd38cc24f4de9eb7e8928c39a850b130 100644 (file)
@@ -74,7 +74,7 @@ err_autopm_put:
        return retval;
 }
 
-static int usb_serial_device_remove(struct device *dev)
+static void usb_serial_device_remove(struct device *dev)
 {
        struct usb_serial_port *port = to_usb_serial_port(dev);
        struct usb_serial_driver *driver;
@@ -101,8 +101,6 @@ static int usb_serial_device_remove(struct device *dev)
 
        if (!autopm_err)
                usb_autopm_put_interface(port->serial->interface);
-
-       return 0;
 }
 
 static ssize_t new_id_store(struct device_driver *driver,
index 7f3c9a8e2bf0820d1dd8fac59ad47858d9f4fcb5..78e0e78954f2d6b4a7c5e7d61d543884b87785ad 100644 (file)
@@ -382,7 +382,7 @@ static int typec_probe(struct device *dev)
        return ret;
 }
 
-static int typec_remove(struct device *dev)
+static void typec_remove(struct device *dev)
 {
        struct typec_altmode_driver *drv = to_altmode_driver(dev->driver);
        struct typec_altmode *adev = to_typec_altmode(dev);
@@ -400,8 +400,6 @@ static int typec_remove(struct device *dev)
 
        adev->desc = NULL;
        adev->ops = NULL;
-
-       return 0;
 }
 
 struct bus_type typec_bus = {
index bb3f1d1f04229ce8af33bdfec2064701db655d97..3fc4525fc05cfb91d84aa51c87e7a9cea49cf33e 100644 (file)
@@ -34,15 +34,13 @@ static int vdpa_dev_probe(struct device *d)
        return ret;
 }
 
-static int vdpa_dev_remove(struct device *d)
+static void vdpa_dev_remove(struct device *d)
 {
        struct vdpa_device *vdev = dev_to_vdpa(d);
        struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver);
 
        if (drv && drv->remove)
                drv->remove(vdev);
-
-       return 0;
 }
 
 static struct bus_type vdpa_bus = {
index c368ec824e2b5c071448c57da4c74def7fcfdee5..e2cb1ff56f6c9be17335f57d941b8afa94c712bb 100644 (file)
@@ -57,7 +57,7 @@ static int mdev_probe(struct device *dev)
        return ret;
 }
 
-static int mdev_remove(struct device *dev)
+static void mdev_remove(struct device *dev)
 {
        struct mdev_driver *drv =
                container_of(dev->driver, struct mdev_driver, driver);
@@ -67,8 +67,6 @@ static int mdev_remove(struct device *dev)
                drv->remove(mdev);
 
        mdev_detach_iommu(mdev);
-
-       return 0;
 }
 
 static int mdev_match(struct device *dev, struct device_driver *drv)
index 4b15c00c0a0afc5de99b1af79cd277553a9322e1..2a6055c0d4d38e17a114745a4af5bf1714624858 100644 (file)
@@ -278,7 +278,7 @@ err:
 
 }
 
-static int virtio_dev_remove(struct device *_d)
+static void virtio_dev_remove(struct device *_d)
 {
        struct virtio_device *dev = dev_to_virtio(_d);
        struct virtio_driver *drv = drv_to_virtio(dev->dev.driver);
@@ -292,7 +292,6 @@ static int virtio_dev_remove(struct device *_d)
 
        /* Acknowledge the device's existence again. */
        virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
-       return 0;
 }
 
 static struct bus_type virtio_bus = {
index e966981c021504fb2ac54648f7a6ce561133ffe8..4af6615808cc515d325a84e41b71108db54eeffe 100644 (file)
@@ -342,14 +342,12 @@ static int vlynq_device_probe(struct device *dev)
        return result;
 }
 
-static int vlynq_device_remove(struct device *dev)
+static void vlynq_device_remove(struct device *dev)
 {
        struct vlynq_driver *drv = to_vlynq_driver(dev->driver);
 
        if (drv->remove)
                drv->remove(to_vlynq_device(dev));
-
-       return 0;
 }
 
 int __vlynq_register_driver(struct vlynq_driver *driver, struct module *owner)
index 1b15afea28ee973662721ea2b2b3456fb5bd3599..8dba20186be3528ac18747b39f70e71c876c611a 100644 (file)
@@ -1990,7 +1990,7 @@ static int vme_bus_probe(struct device *dev)
        return -ENODEV;
 }
 
-static int vme_bus_remove(struct device *dev)
+static void vme_bus_remove(struct device *dev)
 {
        struct vme_driver *driver;
        struct vme_dev *vdev = dev_to_vme_dev(dev);
@@ -1998,8 +1998,6 @@ static int vme_bus_remove(struct device *dev)
        driver = dev->platform_data;
        if (driver->remove)
                driver->remove(vdev);
-
-       return 0;
 }
 
 struct bus_type vme_bus_type = {
index 2a93b7c9c159929557f845c549b7f7676efd3a11..2754bdfadcb89cf7bd36860058eebdfb4b554d90 100644 (file)
@@ -106,7 +106,7 @@ void xs_request_exit(struct xb_req_data *req);
 
 int xenbus_match(struct device *_dev, struct device_driver *_drv);
 int xenbus_dev_probe(struct device *_dev);
-int xenbus_dev_remove(struct device *_dev);
+void xenbus_dev_remove(struct device *_dev);
 int xenbus_register_driver_common(struct xenbus_driver *drv,
                                  struct xen_bus_type *bus,
                                  struct module *owner,
index 33d09b3f6211547597da92fb36e23436cd3e48f7..bd003ca8acbe92bc7a28141ec1cec9783126e228 100644 (file)
@@ -325,7 +325,7 @@ fail:
 }
 EXPORT_SYMBOL_GPL(xenbus_dev_probe);
 
-int xenbus_dev_remove(struct device *_dev)
+void xenbus_dev_remove(struct device *_dev)
 {
        struct xenbus_device *dev = to_xenbus_device(_dev);
        struct xenbus_driver *drv = to_xenbus_driver(_dev->driver);
@@ -355,8 +355,6 @@ int xenbus_dev_remove(struct device *_dev)
        if (!drv->allow_rebind ||
            xenbus_read_driver_state(dev->nodename) == XenbusStateClosing)
                xenbus_switch_state(dev, XenbusStateClosed);
-
-       return 0;
 }
 EXPORT_SYMBOL_GPL(xenbus_dev_remove);
 
index 0dd7cbcec2b0d478b229602280b6cb77f5b372b7..c18524bb8b2a185b19e2b09e09112269e8122638 100644 (file)
@@ -62,7 +62,7 @@ static int zorro_device_probe(struct device *dev)
 }
 
 
-static int zorro_device_remove(struct device *dev)
+static void zorro_device_remove(struct device *dev)
 {
        struct zorro_dev *z = to_zorro_dev(dev);
        struct zorro_driver *drv = to_zorro_driver(dev->driver);
@@ -72,7 +72,6 @@ static int zorro_device_remove(struct device *dev)
                        drv->remove(z);
                z->driver = NULL;
        }
-       return 0;
 }
 
 
index 1ea5e1d1545bd51a195724c2c63fb4da5a01d5f1..062777a45a74d20a300a9c4446971de649b40fb3 100644 (file)
@@ -91,7 +91,7 @@ struct bus_type {
        int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
        int (*probe)(struct device *dev);
        void (*sync_state)(struct device *dev);
-       int (*remove)(struct device *dev);
+       void (*remove)(struct device *dev);
        void (*shutdown)(struct device *dev);
 
        int (*online)(struct device *dev);
index 6ddf646cda659e98cfd5af3cb5202a14f2c5d0ba..0d31a6d71468cf3a04b0178e3dcdf1857d8d334c 100644 (file)
@@ -514,7 +514,7 @@ static int ac97_bus_probe(struct device *dev)
        return ret;
 }
 
-static int ac97_bus_remove(struct device *dev)
+static void ac97_bus_remove(struct device *dev)
 {
        struct ac97_codec_device *adev = to_ac97_device(dev);
        struct ac97_codec_driver *adrv = to_ac97_driver(dev->driver);
@@ -522,7 +522,7 @@ static int ac97_bus_remove(struct device *dev)
 
        ret = pm_runtime_resume_and_get(dev);
        if (ret < 0)
-               return ret;
+               return;
 
        ret = adrv->remove(adev);
        pm_runtime_put_noidle(dev);
@@ -530,8 +530,6 @@ static int ac97_bus_remove(struct device *dev)
                ac97_put_disable_clk(adev);
 
        pm_runtime_disable(dev);
-
-       return ret;
 }
 
 static struct bus_type ac97_bus_type = {
index 002fb5bf220b7e81d58e0f9a43dc6450cdaf9cc8..c9579d97fbab19765be38c01b8b81b8dc188d343 100644 (file)
@@ -104,7 +104,7 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env)
        return retval;
 }
 
-static int soundbus_device_remove(struct device *dev)
+static void soundbus_device_remove(struct device *dev)
 {
        struct soundbus_dev * soundbus_dev = to_soundbus_device(dev);
        struct soundbus_driver * drv = to_soundbus_driver(dev->driver);
@@ -112,8 +112,6 @@ static int soundbus_device_remove(struct device *dev)
        if (dev->driver && drv->remove)
                drv->remove(soundbus_dev);
        soundbus_dev_put(soundbus_dev);
-
-       return 0;
 }
 
 static void soundbus_device_shutdown(struct device *dev)