You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[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>
This commit is contained in:
committed by
Russell King
parent
caf39e87cc
commit
6df29debb7
@@ -354,7 +354,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
|
|||||||
|
|
||||||
static struct platform_device serial_device = {
|
static struct platform_device serial_device = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 0,
|
.id = PLAT8250_DEV_PLATFORM,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = serial_platform_data,
|
.platform_data = serial_platform_data,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
|
|||||||
|
|
||||||
static struct platform_device serial_device = {
|
static struct platform_device serial_device = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 0,
|
.id = PLAT8250_DEV_PLATFORM,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = serial_platform_data,
|
.platform_data = serial_platform_data,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
|
|||||||
|
|
||||||
static struct platform_device serial_device = {
|
static struct platform_device serial_device = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 0,
|
.id = PLAT8250_DEV_PLATFORM,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = serial_platform_data,
|
.platform_data = serial_platform_data,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
|
|||||||
|
|
||||||
static struct platform_device serial_device = {
|
static struct platform_device serial_device = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 0,
|
.id = PLAT8250_DEV_PLATFORM,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = serial_platform_data,
|
.platform_data = serial_platform_data,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
|
|||||||
|
|
||||||
static struct platform_device serial_device = {
|
static struct platform_device serial_device = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 0,
|
.id = PLAT8250_DEV_PLATFORM,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = serial_platform_data,
|
.platform_data = serial_platform_data,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ static struct resource ixp2000_uart_resource = {
|
|||||||
|
|
||||||
static struct platform_device ixp2000_serial_device = {
|
static struct platform_device ixp2000_serial_device = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 0,
|
.id = PLAT8250_DEV_PLATFORM,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = ixp2000_serial_port,
|
.platform_data = ixp2000_serial_port,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ static struct plat_serial8250_port coyote_uart_data[] = {
|
|||||||
|
|
||||||
static struct platform_device coyote_uart = {
|
static struct platform_device coyote_uart = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 0,
|
.id = PLAT8250_DEV_PLATFORM,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = coyote_uart_data,
|
.platform_data = coyote_uart_data,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ static struct plat_serial8250_port gtwx5715_uart_platform_data[] = {
|
|||||||
|
|
||||||
static struct platform_device gtwx5715_uart_device = {
|
static struct platform_device gtwx5715_uart_device = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 0,
|
.id = PLAT8250_DEV_PLATFORM,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = gtwx5715_uart_platform_data,
|
.platform_data = gtwx5715_uart_platform_data,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ static struct plat_serial8250_port ixdp425_uart_data[] = {
|
|||||||
|
|
||||||
static struct platform_device ixdp425_uart = {
|
static struct platform_device ixdp425_uart = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 0,
|
.id = PLAT8250_DEV_PLATFORM,
|
||||||
.dev.platform_data = ixdp425_uart_data,
|
.dev.platform_data = ixdp425_uart_data,
|
||||||
.num_resources = 2,
|
.num_resources = 2,
|
||||||
.resource = ixdp425_uart_resources
|
.resource = ixdp425_uart_resources
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ static struct plat_serial8250_port voiceblue_ports[] = {
|
|||||||
|
|
||||||
static struct platform_device serial_device = {
|
static struct platform_device serial_device = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 1,
|
.id = PLAT8250_DEV_PLATFORM1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = voiceblue_ports,
|
.platform_data = voiceblue_ports,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
|
|||||||
|
|
||||||
static struct platform_device serial_device = {
|
static struct platform_device serial_device = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 0,
|
.id = PLAT8250_DEV_PLATFORM,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = serial_platform_data,
|
.platform_data = serial_platform_data,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
|
|||||||
|
|
||||||
static struct platform_device serial_device = {
|
static struct platform_device serial_device = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 0,
|
.id = PLAT8250_DEV_PLATFORM,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = serial_platform_data,
|
.platform_data = serial_platform_data,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ static struct plat_serial8250_port bast_sio_data[] = {
|
|||||||
|
|
||||||
static struct platform_device bast_sio = {
|
static struct platform_device bast_sio = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 0,
|
.id = PLAT8250_DEV_PLATFORM,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = &bast_sio_data,
|
.platform_data = &bast_sio_data,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
|
|||||||
|
|
||||||
static struct platform_device serial_device = {
|
static struct platform_device serial_device = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 0,
|
.id = PLAT8250_DEV_PLATFORM,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = serial_platform_data,
|
.platform_data = serial_platform_data,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
|
|||||||
|
|
||||||
static struct platform_device serial_device = {
|
static struct platform_device serial_device = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 0,
|
.id = PLAT8250_DEV_PLATFORM,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = serial_platform_data,
|
.platform_data = serial_platform_data,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -140,12 +140,12 @@ struct platform_device ppc_sys_platform_devices[] = {
|
|||||||
},
|
},
|
||||||
[MPC10X_UART0] = {
|
[MPC10X_UART0] = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 0,
|
.id = PLAT8250_DEV_PLATFORM,
|
||||||
.dev.platform_data = serial_plat_uart0,
|
.dev.platform_data = serial_plat_uart0,
|
||||||
},
|
},
|
||||||
[MPC10X_UART1] = {
|
[MPC10X_UART1] = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 1,
|
.id = PLAT8250_DEV_PLATFORM1,
|
||||||
.dev.platform_data = serial_plat_uart1,
|
.dev.platform_data = serial_plat_uart1,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ struct platform_device ppc_sys_platform_devices[] = {
|
|||||||
},
|
},
|
||||||
[MPC83xx_DUART] = {
|
[MPC83xx_DUART] = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 0,
|
.id = PLAT8250_DEV_PLATFORM,
|
||||||
.dev.platform_data = serial_platform_data,
|
.dev.platform_data = serial_platform_data,
|
||||||
},
|
},
|
||||||
[MPC83xx_SEC2] = {
|
[MPC83xx_SEC2] = {
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ struct platform_device ppc_sys_platform_devices[] = {
|
|||||||
},
|
},
|
||||||
[MPC85xx_DUART] = {
|
[MPC85xx_DUART] = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 0,
|
.id = PLAT8250_DEV_PLATFORM,
|
||||||
.dev.platform_data = serial_platform_data,
|
.dev.platform_data = serial_platform_data,
|
||||||
},
|
},
|
||||||
[MPC85xx_PERFMON] = {
|
[MPC85xx_PERFMON] = {
|
||||||
|
|||||||
@@ -1283,7 +1283,7 @@ void __init generic_find_legacy_serial_ports(u64 *physport,
|
|||||||
|
|
||||||
static struct platform_device serial_device = {
|
static struct platform_device serial_device = {
|
||||||
.name = "serial8250",
|
.name = "serial8250",
|
||||||
.id = 0,
|
.id = PLAT8250_DEV_PLATFORM,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = serial_ports,
|
.platform_data = serial_ports,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2536,7 +2536,7 @@ static int __init serial8250_init(void)
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
serial8250_isa_devs = platform_device_register_simple("serial8250",
|
serial8250_isa_devs = platform_device_register_simple("serial8250",
|
||||||
-1, NULL, 0);
|
PLAT8250_DEV_LEGACY, NULL, 0);
|
||||||
if (IS_ERR(serial8250_isa_devs)) {
|
if (IS_ERR(serial8250_isa_devs)) {
|
||||||
ret = PTR_ERR(serial8250_isa_devs);
|
ret = PTR_ERR(serial8250_isa_devs);
|
||||||
goto unreg;
|
goto unreg;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user