Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Uwe Kleine-König and committed by
Greg Kroah-Hartman
1086210a 0d295b19

+7 -8
+7 -8
drivers/i2c/busses/i2c-fsi.c
··· 674 674 return NULL; 675 675 } 676 676 677 - static int fsi_i2c_probe(struct device *dev) 677 + static int fsi_i2c_probe(struct fsi_device *fsi_dev) 678 678 { 679 + struct device *dev = &fsi_dev->dev; 679 680 struct fsi_i2c_ctrl *i2c; 680 681 struct fsi_i2c_port *port; 681 682 struct device_node *np; ··· 736 735 list_add(&port->list, &i2c->ports); 737 736 } 738 737 739 - dev_set_drvdata(dev, i2c); 738 + fsi_set_drvdata(fsi_dev, i2c); 740 739 741 740 return 0; 742 741 } 743 742 744 - static int fsi_i2c_remove(struct device *dev) 743 + static void fsi_i2c_remove(struct fsi_device *fsi_dev) 745 744 { 746 - struct fsi_i2c_ctrl *i2c = dev_get_drvdata(dev); 745 + struct fsi_i2c_ctrl *i2c = fsi_get_drvdata(fsi_dev); 747 746 struct fsi_i2c_port *port, *tmp; 748 747 749 748 list_for_each_entry_safe(port, tmp, &i2c->ports, list) { ··· 751 750 i2c_del_adapter(&port->adapter); 752 751 kfree(port); 753 752 } 754 - 755 - return 0; 756 753 } 757 754 758 755 static const struct fsi_device_id fsi_i2c_ids[] = { ··· 760 761 761 762 static struct fsi_driver fsi_i2c_driver = { 762 763 .id_table = fsi_i2c_ids, 764 + .probe = fsi_i2c_probe, 765 + .remove = fsi_i2c_remove, 763 766 .drv = { 764 767 .name = "i2c-fsi", 765 - .probe = fsi_i2c_probe, 766 - .remove = fsi_i2c_remove, 767 768 }, 768 769 }; 769 770