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

reset: pistachio: use devm_reset_controller_register()

Use devm_reset_controller_register() for the reset controller
registration and drop the .remove callback.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

authored by

Masahiro Yamada and committed by
Philipp Zabel
1b1447f4 56865f45

+1 -11
+1 -11
drivers/reset/reset-pistachio.c
··· 121 121 rd->rcdev.ops = &pistachio_reset_ops; 122 122 rd->rcdev.of_node = np; 123 123 124 - return reset_controller_register(&rd->rcdev); 125 - } 126 - 127 - static int pistachio_reset_remove(struct platform_device *pdev) 128 - { 129 - struct pistachio_reset_data *data = platform_get_drvdata(pdev); 130 - 131 - reset_controller_unregister(&data->rcdev); 132 - 133 - return 0; 124 + return devm_reset_controller_register(dev, &rd->rcdev); 134 125 } 135 126 136 127 static const struct of_device_id pistachio_reset_dt_ids[] = { ··· 132 141 133 142 static struct platform_driver pistachio_reset_driver = { 134 143 .probe = pistachio_reset_probe, 135 - .remove = pistachio_reset_remove, 136 144 .driver = { 137 145 .name = "pistachio-reset", 138 146 .of_match_table = pistachio_reset_dt_ids,