summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi.c
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2024-02-15 11:33:52 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-02-16 12:59:47 +0100
commite8ec515026fd3f73b4c82ad1c36d244feed4e76d (patch)
tree328779464421c374c7e53d3486ae7e1925e934d2 /drivers/spi/spi.c
parent4d515afe56eb337b1118782f53b61b903a962fbd (diff)
downloadbarebox-e8ec515026fd3f73b4c82ad1c36d244feed4e76d.tar.gz
barebox-e8ec515026fd3f73b4c82ad1c36d244feed4e76d.tar.xz
drivers: drop simple bus remove in favor of common implementation
Now that driver core will call dev->driver->remove if dev->bus->remove is NULL, we cann remove all bus_type::remove functions that do the same. This has the welcome side effect that devices that device_remove will return false when called on a device the neither has a bus remove or driver remove function and thus we can skip tracing these calls when CONFIG_DEBUG_PROBES is enabled. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240215103353.2799723-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r--drivers/spi/spi.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 83f2b0ee1b..fd9c8da171 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -417,17 +417,10 @@ static int spi_probe(struct device *dev)
return dev->driver->probe(dev);
}
-static void spi_remove(struct device *dev)
-{
- if (dev->driver->remove)
- dev->driver->remove(dev);
-}
-
struct bus_type spi_bus = {
.name = "spi",
.match = device_match_of_modalias,
.probe = spi_probe,
- .remove = spi_remove,
};
static int spi_bus_init(void)