mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
fsi: sbefifo: Convert to fsi bus probe mechanism
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> Acked-by: Eddie James <eajames@linux.ibm.com> Link: https://patch.msgid.link/79dd5a9459f0719b7602165c89eb6fc24815f3b5.1765279318.git.u.kleine-koenig@baylibre.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
573e29c501
commit
0cf9580a3e
@@ -1022,9 +1022,9 @@ static void sbefifo_free(struct device *dev)
|
||||
* Probe/remove
|
||||
*/
|
||||
|
||||
static int sbefifo_probe(struct device *dev)
|
||||
static int sbefifo_probe(struct fsi_device *fsi_dev)
|
||||
{
|
||||
struct fsi_device *fsi_dev = to_fsi_dev(dev);
|
||||
struct device *dev = &fsi_dev->dev;
|
||||
struct sbefifo *sbefifo;
|
||||
struct device_node *np;
|
||||
struct platform_device *child;
|
||||
@@ -1045,7 +1045,7 @@ static int sbefifo_probe(struct device *dev)
|
||||
|
||||
sbefifo->magic = SBEFIFO_MAGIC;
|
||||
sbefifo->fsi_dev = fsi_dev;
|
||||
dev_set_drvdata(dev, sbefifo);
|
||||
fsi_set_drvdata(fsi_dev, sbefifo);
|
||||
mutex_init(&sbefifo->lock);
|
||||
sbefifo->timeout_in_cmd_ms = SBEFIFO_TIMEOUT_IN_CMD;
|
||||
sbefifo->timeout_start_rsp_ms = SBEFIFO_TIMEOUT_START_RSP;
|
||||
@@ -1101,9 +1101,10 @@ static int sbefifo_unregister_child(struct device *dev, void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sbefifo_remove(struct device *dev)
|
||||
static void sbefifo_remove(struct fsi_device *fsi_dev)
|
||||
{
|
||||
struct sbefifo *sbefifo = dev_get_drvdata(dev);
|
||||
struct device *dev = &fsi_dev->dev;
|
||||
struct sbefifo *sbefifo = fsi_get_drvdata(fsi_dev);
|
||||
|
||||
dev_dbg(dev, "Removing sbefifo device...\n");
|
||||
|
||||
@@ -1117,8 +1118,6 @@ static int sbefifo_remove(struct device *dev)
|
||||
fsi_free_minor(sbefifo->dev.devt);
|
||||
device_for_each_child(dev, NULL, sbefifo_unregister_child);
|
||||
put_device(&sbefifo->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct fsi_device_id sbefifo_ids[] = {
|
||||
@@ -1131,10 +1130,10 @@ static const struct fsi_device_id sbefifo_ids[] = {
|
||||
|
||||
static struct fsi_driver sbefifo_drv = {
|
||||
.id_table = sbefifo_ids,
|
||||
.probe = sbefifo_probe,
|
||||
.remove = sbefifo_remove,
|
||||
.drv = {
|
||||
.name = DEVICE_NAME,
|
||||
.probe = sbefifo_probe,
|
||||
.remove = sbefifo_remove,
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user