Re: [PATCH v2 12/13] i2c: fsi: Convert to fsi bus probe mechanism

Eddie James
2026-01-27T15:29:25Z

On 12/9/25 5:40 AM, Uwe Kleine-König wrote:
> 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.

Acked-by: Eddie James <eajames@linux.ibm.com>

>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
> ---
> drivers/i2c/busses/i2c-fsi.c | 15 +++++++--------
> 1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-fsi.c b/drivers/i2c/busses/i2c-fsi.c
> index e98dd5dcac0f..3a7e577e6eac 100644
> --- a/drivers/i2c/busses/i2c-fsi.c
> +++ b/drivers/i2c/busses/i2c-fsi.c
> @@ -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,
> },
> };
>