aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/spi/spi-xcomm.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/spi/spi-xcomm.c b/drivers/spi/spi-xcomm.c
index 4258c712ad3c..24c40b13dab1 100644
--- a/drivers/spi/spi-xcomm.c
+++ b/drivers/spi/spi-xcomm.c
@@ -231,22 +231,13 @@ static int spi_xcomm_probe(struct i2c_client *i2c,
231 master->dev.of_node = i2c->dev.of_node; 231 master->dev.of_node = i2c->dev.of_node;
232 i2c_set_clientdata(i2c, master); 232 i2c_set_clientdata(i2c, master);
233 233
234 ret = spi_register_master(master); 234 ret = devm_spi_register_master(&i2c->dev, master);
235 if (ret < 0) 235 if (ret < 0)
236 spi_master_put(master); 236 spi_master_put(master);
237 237
238 return ret; 238 return ret;
239} 239}
240 240
241static int spi_xcomm_remove(struct i2c_client *i2c)
242{
243 struct spi_master *master = i2c_get_clientdata(i2c);
244
245 spi_unregister_master(master);
246
247 return 0;
248}
249
250static const struct i2c_device_id spi_xcomm_ids[] = { 241static const struct i2c_device_id spi_xcomm_ids[] = {
251 { "spi-xcomm" }, 242 { "spi-xcomm" },
252 { }, 243 { },
@@ -259,7 +250,6 @@ static struct i2c_driver spi_xcomm_driver = {
259 }, 250 },
260 .id_table = spi_xcomm_ids, 251 .id_table = spi_xcomm_ids,
261 .probe = spi_xcomm_probe, 252 .probe = spi_xcomm_probe,
262 .remove = spi_xcomm_remove,
263}; 253};
264module_i2c_driver(spi_xcomm_driver); 254module_i2c_driver(spi_xcomm_driver);
265 255