mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: mfe@pengutronix.de, Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 3/6] treewide: remove bus probe functions that just call driver probe
Date: Wed, 28 Feb 2024 17:05:15 +0100	[thread overview]
Message-ID: <20240228160518.1589193-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20240228160518.1589193-1-a.fatoum@pengutronix.de>

Now that the driver core will call the driver probe function if there is
no bus probe function, remove all bus probe functions that do what the
core can do instead.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/bus/acpi.c     | 6 ------
 drivers/i2c/i2c.c      | 6 ------
 drivers/spi/spi.c      | 6 ------
 drivers/tee/tee_core.c | 6 ------
 4 files changed, 24 deletions(-)

diff --git a/drivers/bus/acpi.c b/drivers/bus/acpi.c
index cf85e886d0a2..0d11b604ae5d 100644
--- a/drivers/bus/acpi.c
+++ b/drivers/bus/acpi.c
@@ -205,15 +205,9 @@ static int acpi_bus_match(struct device *dev, struct driver *drv)
 	return acpi_sigcmp(acpidrv->signature, sdt->signature);
 }
 
-static int acpi_bus_probe(struct device *dev)
-{
-	return dev->driver->probe(dev);
-}
-
 struct bus_type acpi_bus = {
 	.name = "acpi",
 	.match = acpi_bus_match,
-	.probe = acpi_bus_probe,
 };
 
 static int efi_acpi_probe(void)
diff --git a/drivers/i2c/i2c.c b/drivers/i2c/i2c.c
index 997fc8d81725..547151904517 100644
--- a/drivers/i2c/i2c.c
+++ b/drivers/i2c/i2c.c
@@ -743,15 +743,9 @@ int i2c_add_numbered_adapter(struct i2c_adapter *adapter)
 }
 EXPORT_SYMBOL(i2c_add_numbered_adapter);
 
-static int i2c_probe(struct device *dev)
-{
-	return dev->driver->probe(dev);
-}
-
 struct bus_type i2c_bus = {
 	.name = "i2c",
 	.match = device_match_of_modalias,
-	.probe = i2c_probe,
 };
 
 static int i2c_bus_init(void)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index fd9c8da17100..c627d88954a7 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -412,15 +412,9 @@ int spi_write_then_read(struct spi_device *spi,
 }
 EXPORT_SYMBOL(spi_write_then_read);
 
-static int spi_probe(struct device *dev)
-{
-	return dev->driver->probe(dev);
-}
-
 struct bus_type spi_bus = {
 	.name = "spi",
 	.match = device_match_of_modalias,
-	.probe = spi_probe,
 };
 
 static int spi_bus_init(void)
diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c
index 36c6210b8b1d..45fa9b567072 100644
--- a/drivers/tee/tee_core.c
+++ b/drivers/tee/tee_core.c
@@ -770,15 +770,9 @@ static int tee_client_device_match(struct device *dev,
 	return -1;
 }
 
-static int tee_bus_probe(struct device *dev)
-{
-	return dev->driver->probe(dev);
-}
-
 struct bus_type tee_bus_type = {
 	.name		= "tee",
 	.match		= tee_client_device_match,
-	.probe		= tee_bus_probe,
 };
 EXPORT_SYMBOL_GPL(tee_bus_type);
 
-- 
2.39.2




  parent reply	other threads:[~2024-02-28 16:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-28 16:05 [PATCH 1/6] driver: make struct bus_type::match optional Ahmad Fatoum
2024-02-28 16:05 ` [PATCH 2/6] driver: make struct bus_type::probe optional Ahmad Fatoum
2024-02-28 16:05 ` Ahmad Fatoum [this message]
2024-02-28 16:05 ` [PATCH 4/6] usb: otg: maintain list of USB OTG controllers Ahmad Fatoum
2024-02-28 16:05 ` [PATCH 5/6] usb: otg: turn global otg device into device alias Ahmad Fatoum
2024-02-28 16:05 ` [PATCH 6/6] usb: print number of skipped OTG controllers when scanning Ahmad Fatoum
2024-02-29  8:10 ` [PATCH 1/6] driver: make struct bus_type::match optional Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240228160518.1589193-3-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=mfe@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox