Move the Capability search logic into a header-based macro that accepts a
config space accessor function as an argument. This enables controller
drivers to perform Capability discovery using their early access mechanisms
prior to full device initialization while maintaining the original search
behavior.
... while maintaining ... ->
... while sharing the Capability search code.
Convert the existing PCI core Capability search implementation to use this new
macro
I think the rest of this paragraph after this are unnecessary.
, eliminating code duplication. The refactoring preserves the original
functionality without behavioral changes, while allowing both the core and
drivers to share common Capability discovery logic.
Other than that, it seemed good enough for me.