Unverified Commit 93997a05 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

regulator: twl: Use of_device_get_match_data()



Use of_device_get_match_data() to simplify the code a bit.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 37b9ef9c
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -576,14 +576,9 @@ static int twlreg_probe(struct platform_device *pdev)
	struct regulator_init_data	*initdata;
	struct regulation_constraints	*c;
	struct regulator_dev		*rdev;
	const struct of_device_id	*match;
	struct regulator_config		config = { };

	match = of_match_device(twl_of_match, &pdev->dev);
	if (!match)
		return -ENODEV;

	template = match->data;
	template = of_device_get_match_data(&pdev->dev);
	if (!template)
		return -ENODEV;