diff options
author | Benjamin Gaignard <benjamin.gaignard@linaro.org> | 2017-05-29 17:45:58 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2017-07-06 08:29:12 +0100 |
commit | 9bf2db7834993b776707618ab5828265100bf3fd (patch) | |
tree | 6a47e5931a344e3a952ba28b89217ee978950c43 /drivers | |
parent | 66002163f047884b8f245eb85249144e43168b92 (diff) | |
download | linux-9bf2db7834993b776707618ab5828265100bf3fd.tar.gz linux-9bf2db7834993b776707618ab5828265100bf3fd.tar.bz2 linux-9bf2db7834993b776707618ab5828265100bf3fd.zip |
mfd: motorola-cpcap: Use devm_of_platform_populate()
Usage of devm_of_platform_populate() simplify driver code
by allowing to delete cpcap_remove().
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mfd/motorola-cpcap.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/mfd/motorola-cpcap.c b/drivers/mfd/motorola-cpcap.c index 3cab58ab0b84..d2cc1eabac05 100644 --- a/drivers/mfd/motorola-cpcap.c +++ b/drivers/mfd/motorola-cpcap.c @@ -260,17 +260,7 @@ static int cpcap_probe(struct spi_device *spi) if (ret) return ret; - return of_platform_populate(spi->dev.of_node, NULL, NULL, - &cpcap->spi->dev); -} - -static int cpcap_remove(struct spi_device *pdev) -{ - struct cpcap_ddata *cpcap = spi_get_drvdata(pdev); - - of_platform_depopulate(&cpcap->spi->dev); - - return 0; + return devm_of_platform_populate(&cpcap->spi->dev); } static struct spi_driver cpcap_driver = { @@ -279,7 +269,6 @@ static struct spi_driver cpcap_driver = { .of_match_table = cpcap_of_match, }, .probe = cpcap_probe, - .remove = cpcap_remove, }; module_spi_driver(cpcap_driver); |