summaryrefslogtreecommitdiffstats
path: root/arch/nios2
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-04-15 20:29:34 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-04-16 09:43:02 +0200
commitabe4560c8add1c58a944b36e8ea51b10968f4d7b (patch)
tree03976ccedc5bb0a92cbd1b8ded76ad00f9e2b072 /arch/nios2
parent158294a49aade9fde1000dd5403f40d0f15d64e3 (diff)
downloadbarebox-abe4560c8add1c58a944b36e8ea51b10968f4d7b.tar.gz
barebox-abe4560c8add1c58a944b36e8ea51b10968f4d7b.tar.xz
Use DEVICE_ID_DYNAMIC where applicable
We now have DEVICE_ID_DYNAMIC for dynamic allocation of device ids, Use it where applicable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/nios2')
-rw-r--r--arch/nios2/boards/generic/generic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/nios2/boards/generic/generic.c b/arch/nios2/boards/generic/generic.c
index 0e3852b007..758e75a812 100644
--- a/arch/nios2/boards/generic/generic.c
+++ b/arch/nios2/boards/generic/generic.c
@@ -25,7 +25,7 @@ static struct resource mac_resources[] = {
};
static struct device_d mac_dev = {
- .id = -1,
+ .id = DEVICE_ID_DYNAMIC,
.name = "altera_tse",
.num_resources = ARRAY_SIZE(mac_resources),
.resource = mac_resources,
@@ -53,8 +53,8 @@ device_initcall(generic_devices_init);
static int altera_console_init(void)
{
- add_generic_device("altera_serial", -1, NULL, NIOS_SOPC_UART_BASE, 0x20,
- IORESOURCE_MEM, NULL);
+ add_generic_device("altera_serial", DEVICE_ID_DYNAMIC, NULL,
+ NIOS_SOPC_UART_BASE, 0x20, IORESOURCE_MEM, NULL);
return 0;
}