Commit 8a57c3cc authored by Minghao Chi (CGEL ZTE)'s avatar Minghao Chi (CGEL ZTE) Committed by Michael Ellerman
Browse files

powerpc/platforms/83xx: Use of_device_get_match_data()

parent 3def164a
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -322,18 +322,15 @@ static const struct platform_suspend_ops mpc83xx_suspend_ops = {
static const struct of_device_id pmc_match[];
static int pmc_probe(struct platform_device *ofdev)
{
	const struct of_device_id *match;
	struct device_node *np = ofdev->dev.of_node;
	struct resource res;
	const struct pmc_type *type;
	int ret = 0;

	match = of_match_device(pmc_match, &ofdev->dev);
	if (!match)
	type = of_device_get_match_data(&ofdev->dev);
	if (!type)
		return -EINVAL;

	type = match->data;

	if (!of_device_is_available(np))
		return -ENODEV;