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

mfd: atmel-hlcdc: Use devm_mfd_add_devices() for mfd_device registration

Use devm_mfd_add_devices() for MFD devices registration and get
rid of .remove callback to remove MFD child-devices. This is done
by managed device framework.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Laxman Dewangan and committed by
Lee Jones
f32fb9a5 9c998326

+3 -11
+3 -11
drivers/mfd/atmel-hlcdc.c
··· 128 128 129 129 dev_set_drvdata(dev, hlcdc); 130 130 131 - return mfd_add_devices(dev, -1, atmel_hlcdc_cells, 132 - ARRAY_SIZE(atmel_hlcdc_cells), 133 - NULL, 0, NULL); 134 - } 135 - 136 - static int atmel_hlcdc_remove(struct platform_device *pdev) 137 - { 138 - mfd_remove_devices(&pdev->dev); 139 - 140 - return 0; 131 + return devm_mfd_add_devices(dev, -1, atmel_hlcdc_cells, 132 + ARRAY_SIZE(atmel_hlcdc_cells), 133 + NULL, 0, NULL); 141 134 } 142 135 143 136 static const struct of_device_id atmel_hlcdc_match[] = { ··· 145 152 146 153 static struct platform_driver atmel_hlcdc_driver = { 147 154 .probe = atmel_hlcdc_probe, 148 - .remove = atmel_hlcdc_remove, 149 155 .driver = { 150 156 .name = "atmel-hlcdc", 151 157 .of_match_table = atmel_hlcdc_match,