mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
To: Eddie James <eajames@linux.ibm.com>
Cc: Ninad Palsule <ninad@linux.ibm.com>,
	linux-fsi@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH 10/12] fsi: scom: Convert to fsi bus probe mechanism
Date: Sat, 29 Nov 2025 17:57:46 +0100	[thread overview]
Message-ID: <b2e2f65a07c4184971cdc3190df13a034d3efa12.1764434226.git.ukleinek@kernel.org> (raw)
In-Reply-To: <cover.1764434226.git.ukleinek@kernel.org>

The fsi bus got a dedicated probe function. Make use of that. This fixes
a runtime warning about the driver needing to be converted to the bus
probe method.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
 drivers/fsi/fsi-scom.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/fsi/fsi-scom.c b/drivers/fsi/fsi-scom.c
index 2eda44451cc1..67cd45605fe4 100644
--- a/drivers/fsi/fsi-scom.c
+++ b/drivers/fsi/fsi-scom.c
@@ -527,16 +527,16 @@ static void scom_free(struct device *dev)
 	kfree(scom);
 }
 
-static int scom_probe(struct device *dev)
+static int scom_probe(struct fsi_device *fsi_dev)
 {
-	struct fsi_device *fsi_dev = to_fsi_dev(dev);
+	struct device *dev = &fsi_dev->dev;
 	struct scom_device *scom;
 	int rc, didx;
 
 	scom = kzalloc(sizeof(*scom), GFP_KERNEL);
 	if (!scom)
 		return -ENOMEM;
-	dev_set_drvdata(dev, scom);
+	fsi_set_drvdata(fsi_dev, scom);
 	mutex_init(&scom->lock);
 
 	/* Grab a reference to the device (parent of our cdev), we'll drop it later */
@@ -574,9 +574,9 @@ static int scom_probe(struct device *dev)
 	return rc;
 }
 
-static int scom_remove(struct device *dev)
+static void scom_remove(struct fsi_device *fsi_dev)
 {
-	struct scom_device *scom = dev_get_drvdata(dev);
+	struct scom_device *scom = fsi_get_drvdata(fsi_dev);
 
 	mutex_lock(&scom->lock);
 	scom->dead = true;
@@ -584,8 +584,6 @@ static int scom_remove(struct device *dev)
 	cdev_device_del(&scom->cdev, &scom->dev);
 	fsi_free_minor(scom->dev.devt);
 	put_device(&scom->dev);
-
-	return 0;
 }
 
 static const struct of_device_id scom_of_ids[] = {
@@ -604,11 +602,11 @@ static const struct fsi_device_id scom_ids[] = {
 
 static struct fsi_driver scom_drv = {
 	.id_table = scom_ids,
+	.probe = scom_probe,
+	.remove = scom_remove,
 	.drv = {
 		.name = "scom",
 		.of_match_table = scom_of_ids,
-		.probe = scom_probe,
-		.remove = scom_remove,
 	}
 };
 
-- 
2.47.3


  parent reply	other threads:[~2025-11-29 16:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-29 16:57 [PATCH 00/12] fsi: Convert to " Uwe Kleine-König
2025-11-29 16:57 ` [PATCH 01/12] fsi: Make use of module_fsi_driver() Uwe Kleine-König
2025-11-29 16:57 ` [PATCH 02/12] fsi: Assign driver's bus in fsi_driver_register() Uwe Kleine-König
2025-11-29 16:57 ` [PATCH 03/12] fsi: Provide thin wrappers around dev_[gs]et_data() for fsi devices Uwe Kleine-König
2025-11-29 16:57 ` [PATCH 04/12] i2c: fsi: Drop assigning fsi bus Uwe Kleine-König
2025-12-03 17:07   ` Andi Shyti
2025-12-04 11:18     ` Uwe Kleine-König
2025-11-29 16:57 ` [PATCH 05/12] spi: " Uwe Kleine-König
2025-12-02 17:46   ` Mark Brown
2025-11-29 16:57 ` [PATCH 06/12] fsi: Make fsi_bus_type a private variable to the core Uwe Kleine-König
2025-11-29 16:57 ` [PATCH 07/12] fsi: Create bus specific probe and remove functions Uwe Kleine-König
2025-11-29 16:57 ` [PATCH 08/12] fsi: master: Convert to fsi bus probe mechanism Uwe Kleine-König
2025-11-29 16:57 ` [PATCH 09/12] fsi: sbefifo: " Uwe Kleine-König
2025-11-29 16:57 ` Uwe Kleine-König [this message]
2025-11-29 16:57 ` [PATCH 11/12] i2c: fsi: " Uwe Kleine-König
2025-12-03 17:12   ` Andi Shyti
2025-11-29 16:57 ` [PATCH 12/12] spi: " Uwe Kleine-König
2025-12-02 17:46   ` Mark Brown
2025-12-05 15:30 ` [PATCH 00/12] fsi: Convert to " Uwe Kleine-König

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=b2e2f65a07c4184971cdc3190df13a034d3efa12.1764434226.git.ukleinek@kernel.org \
    --to=u.kleine-koenig@baylibre.com \
    --cc=eajames@linux.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fsi@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ninad@linux.ibm.com \
    /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

all inboxes | Powered by JetHome®