Commit df55e317 authored by Vladimir Oltean's avatar Vladimir Oltean Committed by Jakub Kicinski
Browse files

of: base: export of_device_compatible_match() for use in modules



Modules such as net/dsa/dsa_core.ko might want to iterate through an
array of compatible strings for things such as validation (or rather,
skipping it for some potentially broken drivers).

of_device_is_compatible() is exported, by of_device_compatible_match()
isn't. Export the latter as well, so we don't have to open-code the
iteration.

Cc: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 2ec2fb83
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -578,6 +578,7 @@ int of_device_compatible_match(struct device_node *device,

	return score;
}
EXPORT_SYMBOL_GPL(of_device_compatible_match);

/**
 * of_machine_is_compatible - Test root of device tree for a given compatible value