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.

fsi: i2cr-scom: Convert to fsi bus probe mechanism

The fsi bus got a dedicated probe and remove callback. Make use of them.
This fixes a runtime warning about the driver needing to be converted to
the bus methods.

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/694a7d077316c3e2883a8410eade67cd578ee556.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
ec93d2ea 69d4ca00

+6 -8
+6 -8
drivers/fsi/i2cr-scom.c
··· 81 81 .write = i2cr_scom_write, 82 82 }; 83 83 84 - static int i2cr_scom_probe(struct device *dev) 84 + static int i2cr_scom_probe(struct fsi_device *fsi_dev) 85 85 { 86 - struct fsi_device *fsi_dev = to_fsi_dev(dev); 86 + struct device *dev = &fsi_dev->dev; 87 87 struct i2cr_scom *scom; 88 88 int didx; 89 89 int ret; ··· 115 115 return ret; 116 116 } 117 117 118 - static int i2cr_scom_remove(struct device *dev) 118 + static void i2cr_scom_remove(struct fsi_device *fsi_dev) 119 119 { 120 - struct i2cr_scom *scom = dev_get_drvdata(dev); 120 + struct i2cr_scom *scom = dev_get_drvdata(&fsi_dev->dev); 121 121 122 122 cdev_device_del(&scom->cdev, &scom->dev); 123 123 fsi_free_minor(scom->dev.devt); 124 - 125 - return 0; 126 124 } 127 125 128 126 static const struct of_device_id i2cr_scom_of_ids[] = { ··· 135 137 }; 136 138 137 139 static struct fsi_driver i2cr_scom_driver = { 140 + .probe = i2cr_scom_probe, 141 + .remove = i2cr_scom_remove, 138 142 .id_table = i2cr_scom_ids, 139 143 .drv = { 140 144 .name = "i2cr_scom", 141 145 .of_match_table = i2cr_scom_of_ids, 142 - .probe = i2cr_scom_probe, 143 - .remove = i2cr_scom_remove, 144 146 } 145 147 }; 146 148