firmware: arm_scmi: Refactor device matching logic to eliminate duplication
Currently, the device matching logic is duplicated in two functions:
- scmi_dev_match() used by the scmi_bus to match scmi_devices with
scmi_drivers.
- scmi_child_dev_find() used to check for the presence of a device
with the same name and protocol_id to avoid adding duplicates to
the bus.
Refactor the code to eliminate the redundant matching logic and
consolidates the functionality for better maintainability and efficiency.
Message-Id: <
20250317-b4-scmi_minor_cleanup-v2-2-
f4be99bd9864@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>