spi: deduplicate spi_match_id() in __spi_register_driver()

The same logic is used in spi_match_id() and in the __spi_register_driver().
By switching the former from taking struct spi_device * to const char * as
the second parameter we may deduplicate the code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20211119173718.52938-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Andy Shevchenko 2021-11-19 19:37:17 +02:00 • committed by Mark Brown
commit 3f07657506
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0