Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b1447f4 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Philipp Zabel
Browse files

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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent 56865f45
Loading
Loading
Loading
Loading
+1 −11
Original line number Original line Diff line number Diff line
@@ -121,16 +121,7 @@ static int pistachio_reset_probe(struct platform_device *pdev)
	rd->rcdev.ops = &pistachio_reset_ops;
	rd->rcdev.ops = &pistachio_reset_ops;
	rd->rcdev.of_node = np;
	rd->rcdev.of_node = np;


	return reset_controller_register(&rd->rcdev);
	return devm_reset_controller_register(dev, &rd->rcdev);
}

static int pistachio_reset_remove(struct platform_device *pdev)
{
	struct pistachio_reset_data *data = platform_get_drvdata(pdev);

	reset_controller_unregister(&data->rcdev);

	return 0;
}
}


static const struct of_device_id pistachio_reset_dt_ids[] = {
static const struct of_device_id pistachio_reset_dt_ids[] = {
@@ -141,7 +132,6 @@ MODULE_DEVICE_TABLE(of, pistachio_reset_dt_ids);


static struct platform_driver pistachio_reset_driver = {
static struct platform_driver pistachio_reset_driver = {
	.probe	= pistachio_reset_probe,
	.probe	= pistachio_reset_probe,
	.remove	= pistachio_reset_remove,
	.driver = {
	.driver = {
		.name		= "pistachio-reset",
		.name		= "pistachio-reset",
		.of_match_table	= pistachio_reset_dt_ids,
		.of_match_table	= pistachio_reset_dt_ids,