Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Benjamin Gaignard and committed by
Lee Jones
9bf2db78 66002163

+1 -12
+1 -12
drivers/mfd/motorola-cpcap.c
··· 260 260 if (ret) 261 261 return ret; 262 262 263 - return of_platform_populate(spi->dev.of_node, NULL, NULL, 264 - &cpcap->spi->dev); 265 - } 266 - 267 - static int cpcap_remove(struct spi_device *pdev) 268 - { 269 - struct cpcap_ddata *cpcap = spi_get_drvdata(pdev); 270 - 271 - of_platform_depopulate(&cpcap->spi->dev); 272 - 273 - return 0; 263 + return devm_of_platform_populate(&cpcap->spi->dev); 274 264 } 275 265 276 266 static struct spi_driver cpcap_driver = { ··· 269 279 .of_match_table = cpcap_of_match, 270 280 }, 271 281 .probe = cpcap_probe, 272 - .remove = cpcap_remove, 273 282 }; 274 283 module_spi_driver(cpcap_driver); 275 284