Skip to content

Commit ec93d2e

Browse files
ukleinekgregkh
authored andcommitted
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>
1 parent 69d4ca0 commit ec93d2e

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

drivers/fsi/i2cr-scom.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ static const struct file_operations i2cr_scom_fops = {
8181
.write = i2cr_scom_write,
8282
};
8383

84-
static int i2cr_scom_probe(struct device *dev)
84+
static int i2cr_scom_probe(struct fsi_device *fsi_dev)
8585
{
86-
struct fsi_device *fsi_dev = to_fsi_dev(dev);
86+
struct device *dev = &fsi_dev->dev;
8787
struct i2cr_scom *scom;
8888
int didx;
8989
int ret;
@@ -115,14 +115,12 @@ static int i2cr_scom_probe(struct device *dev)
115115
return ret;
116116
}
117117

118-
static int i2cr_scom_remove(struct device *dev)
118+
static void i2cr_scom_remove(struct fsi_device *fsi_dev)
119119
{
120-
struct i2cr_scom *scom = dev_get_drvdata(dev);
120+
struct i2cr_scom *scom = dev_get_drvdata(&fsi_dev->dev);
121121

122122
cdev_device_del(&scom->cdev, &scom->dev);
123123
fsi_free_minor(scom->dev.devt);
124-
125-
return 0;
126124
}
127125

128126
static const struct of_device_id i2cr_scom_of_ids[] = {
@@ -137,12 +135,12 @@ static const struct fsi_device_id i2cr_scom_ids[] = {
137135
};
138136

139137
static struct fsi_driver i2cr_scom_driver = {
138+
.probe = i2cr_scom_probe,
139+
.remove = i2cr_scom_remove,
140140
.id_table = i2cr_scom_ids,
141141
.drv = {
142142
.name = "i2cr_scom",
143143
.of_match_table = i2cr_scom_of_ids,
144-
.probe = i2cr_scom_probe,
145-
.remove = i2cr_scom_remove,
146144
}
147145
};
148146

0 commit comments

Comments
 (0)