IOMUX: Split out iomux_match_device() helper

Deduplicate the code used in a few places by splitting out a common helper.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
diff --git a/include/iomux.h b/include/iomux.h
index da7ff69..9c2d579 100644
--- a/include/iomux.h
+++ b/include/iomux.h
@@ -24,6 +24,7 @@
  */
 extern int cd_count[MAX_FILES];
 
+int iomux_match_device(struct stdio_dev **, const int, struct stdio_dev *);
 int iomux_doenv(const int, const char *);
 void iomux_printdevs(const int);