tifm: simplify bus match and uevent handlers

Remove code duplicating the kernel functionality and clean up data
structures involved in driver matching.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
diff --git a/drivers/mmc/tifm_sd.c b/drivers/mmc/tifm_sd.c
index 8905b129..4388ee9 100644
--- a/drivers/mmc/tifm_sd.c
+++ b/drivers/mmc/tifm_sd.c
@@ -948,7 +948,7 @@
 	struct mmc_host *mmc = tifm_get_drvdata(sock);
 	struct tifm_sd *host = mmc_priv(mmc);
 
-	if (sock->media_id != FM_SD
+	if (sock->type != TIFM_TYPE_SD
 	    || tifm_sd_initialize_host(host)) {
 		tifm_eject(sock);
 		return 0;
@@ -964,8 +964,8 @@
 
 #endif /* CONFIG_PM */
 
-static tifm_media_id tifm_sd_id_tbl[] = {
-	FM_SD, 0
+static struct tifm_device_id tifm_sd_id_tbl[] = {
+	{ TIFM_TYPE_SD }, { }
 };
 
 static struct tifm_driver tifm_sd_driver = {