[SERIAL] Use an enum for serial8250 platform device IDs

Rather than hard-coding the platform device IDs, enumerate them.
We don't particularly care about the actual ID we get, just as
long as they're unique.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 30a0a3d..5b65e20 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2536,7 +2536,7 @@
 		goto out;
 
 	serial8250_isa_devs = platform_device_register_simple("serial8250",
-							      -1, NULL, 0);
+					 PLAT8250_DEV_LEGACY, NULL, 0);
 	if (IS_ERR(serial8250_isa_devs)) {
 		ret = PTR_ERR(serial8250_isa_devs);
 		goto unreg;
diff --git a/drivers/serial/8250_accent.c b/drivers/serial/8250_accent.c
index 1f2c276..9c10262 100644
--- a/drivers/serial/8250_accent.c
+++ b/drivers/serial/8250_accent.c
@@ -29,7 +29,7 @@
 
 static struct platform_device accent_device = {
 	.name			= "serial8250",
-	.id			= 2,
+	.id			= PLAT8250_DEV_ACCENT,
 	.dev			= {
 		.platform_data	= accent_data,
 	},
diff --git a/drivers/serial/8250_boca.c b/drivers/serial/8250_boca.c
index 465c9ea..3bfe0f7 100644
--- a/drivers/serial/8250_boca.c
+++ b/drivers/serial/8250_boca.c
@@ -43,7 +43,7 @@
 
 static struct platform_device boca_device = {
 	.name			= "serial8250",
-	.id			= 3,
+	.id			= PLAT8250_DEV_BOCA,
 	.dev			= {
 		.platform_data	= boca_data,
 	},
diff --git a/drivers/serial/8250_fourport.c b/drivers/serial/8250_fourport.c
index e9b4d90..6375d68 100644
--- a/drivers/serial/8250_fourport.c
+++ b/drivers/serial/8250_fourport.c
@@ -35,7 +35,7 @@
 
 static struct platform_device fourport_device = {
 	.name			= "serial8250",
-	.id			= 1,
+	.id			= PLAT8250_DEV_FOURPORT,
 	.dev			= {
 		.platform_data	= fourport_data,
 	},
diff --git a/drivers/serial/8250_hub6.c b/drivers/serial/8250_hub6.c
index 77f396f..daf569c 100644
--- a/drivers/serial/8250_hub6.c
+++ b/drivers/serial/8250_hub6.c
@@ -40,7 +40,7 @@
 
 static struct platform_device hub6_device = {
 	.name			= "serial8250",
-	.id			= 4,
+	.id			= PLAT8250_DEV_HUB6,
 	.dev			= {
 		.platform_data	= hub6_data,
 	},
diff --git a/drivers/serial/8250_mca.c b/drivers/serial/8250_mca.c
index f0c40d6..ac20525 100644
--- a/drivers/serial/8250_mca.c
+++ b/drivers/serial/8250_mca.c
@@ -44,7 +44,7 @@
 
 static struct platform_device mca_device = {
 	.name			= "serial8250",
-	.id			= 5,
+	.id			= PLAT8250_DEV_MCA,
 	.dev			= {
 		.platform_data	= mca_data,
 	},