mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
i2c: fsi: 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> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Acked-by: Eddie James <eajames@linux.ibm.com> Link: https://patch.msgid.link/d8c27aed45bf3119c08c9772768d675ae2ccc0c3.1765279318.git.u.kleine-koenig@baylibre.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0d295b19bd
commit
1086210a46
|
|
@ -674,8 +674,9 @@ static struct device_node *fsi_i2c_find_port_of_node(struct device_node *fsi,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static int fsi_i2c_probe(struct device *dev)
|
||||
static int fsi_i2c_probe(struct fsi_device *fsi_dev)
|
||||
{
|
||||
struct device *dev = &fsi_dev->dev;
|
||||
struct fsi_i2c_ctrl *i2c;
|
||||
struct fsi_i2c_port *port;
|
||||
struct device_node *np;
|
||||
|
|
@ -735,14 +736,14 @@ static int fsi_i2c_probe(struct device *dev)
|
|||
list_add(&port->list, &i2c->ports);
|
||||
}
|
||||
|
||||
dev_set_drvdata(dev, i2c);
|
||||
fsi_set_drvdata(fsi_dev, i2c);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fsi_i2c_remove(struct device *dev)
|
||||
static void fsi_i2c_remove(struct fsi_device *fsi_dev)
|
||||
{
|
||||
struct fsi_i2c_ctrl *i2c = dev_get_drvdata(dev);
|
||||
struct fsi_i2c_ctrl *i2c = fsi_get_drvdata(fsi_dev);
|
||||
struct fsi_i2c_port *port, *tmp;
|
||||
|
||||
list_for_each_entry_safe(port, tmp, &i2c->ports, list) {
|
||||
|
|
@ -750,8 +751,6 @@ static int fsi_i2c_remove(struct device *dev)
|
|||
i2c_del_adapter(&port->adapter);
|
||||
kfree(port);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct fsi_device_id fsi_i2c_ids[] = {
|
||||
|
|
@ -761,10 +760,10 @@ static const struct fsi_device_id fsi_i2c_ids[] = {
|
|||
|
||||
static struct fsi_driver fsi_i2c_driver = {
|
||||
.id_table = fsi_i2c_ids,
|
||||
.probe = fsi_i2c_probe,
|
||||
.remove = fsi_i2c_remove,
|
||||
.drv = {
|
||||
.name = "i2c-fsi",
|
||||
.probe = fsi_i2c_probe,
|
||||
.remove = fsi_i2c_remove,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user