summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-xcomm.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-12-04 14:15:23 +0900
committerMark Brown <broonie@linaro.org>2013-12-04 12:52:30 +0000
commit4cc16085c80d3363315ad183ad72654993766a0f (patch)
tree037a273bc38996c9801668d54cc9dad8d8cc8640 /drivers/spi/spi-xcomm.c
parent6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff)
downloadlwn-4cc16085c80d3363315ad183ad72654993766a0f.tar.gz
lwn-4cc16085c80d3363315ad183ad72654993766a0f.zip
spi: xcomm: Use devm_spi_register_master()
Use devm_spi_register_master() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-xcomm.c')
-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,
master->dev.of_node = i2c->dev.of_node;
i2c_set_clientdata(i2c, master);
- ret = spi_register_master(master);
+ ret = devm_spi_register_master(&i2c->dev, master);
if (ret < 0)
spi_master_put(master);
return ret;
}
-static int spi_xcomm_remove(struct i2c_client *i2c)
-{
- struct spi_master *master = i2c_get_clientdata(i2c);
-
- spi_unregister_master(master);
-
- return 0;
-}
-
static const struct i2c_device_id spi_xcomm_ids[] = {
{ "spi-xcomm" },
{ },
@@ -259,7 +250,6 @@ static struct i2c_driver spi_xcomm_driver = {
},
.id_table = spi_xcomm_ids,
.probe = spi_xcomm_probe,
- .remove = spi_xcomm_remove,
};
module_i2c_driver(spi_xcomm_driver);