diff options
author | Benjamin Walsh <benjamin.walsh@windriver.com> | 2016-01-28 14:48:47 -0500 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2016-02-05 20:25:25 -0500 |
commit | d340d4cb3f3468cff4a01158fd09ea9af787d51a (patch) | |
tree | 9735bf8960f10d252c7e8e8579dc5168c4922ef8 /samples | |
parent | ef33dc32e532e47d6ce67878724531a7be6abd0a (diff) |
device: use DEVICE_INIT everwhere
This is the last step before obsoleting DEVICE_DEFINE() and
DEVICE_INIT_CONFIG_DEFINE().
Change-Id: Ica4257662969048083ab9839872b4b437b8b351b
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Diffstat (limited to 'samples')
-rw-r--r-- | samples/nanokernel/test/test_ipm/src/test_ipm.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/samples/nanokernel/test/test_ipm/src/test_ipm.c b/samples/nanokernel/test/test_ipm/src/test_ipm.c index 4d3382826..814d78e10 100644 --- a/samples/nanokernel/test/test_ipm/src/test_ipm.c +++ b/samples/nanokernel/test/test_ipm/src/test_ipm.c @@ -40,9 +40,9 @@ /* Set up the dummy IPM driver */ struct ipm_dummy_driver_data ipm_dummy0_driver_data; -DEVICE_INIT_CONFIG_DEFINE(ipm_dummy0, "ipm_dummy0", ipm_dummy_init, NULL); -DEVICE_DEFINE(ipm_dummy0, &ipm_dummy0_driver_data, SECONDARY, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); +DEVICE_INIT(ipm_dummy0, "ipm_dummy0", ipm_dummy_init, + &ipm_dummy0_driver_data, NULL, + SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); /* Sending side of the console IPM driver, will forward anything sent * to printf() since we selected IPM_CONSOLE_STDOUT @@ -51,10 +51,9 @@ struct ipm_console_sender_config_info sender_config = { .bind_to = "ipm_dummy0", .flags = SOURCE }; -DEVICE_INIT_CONFIG_DEFINE(ipm_console_send0, "ipm_send0", - ipm_console_sender_init, &sender_config); -DEVICE_DEFINE(ipm_console_send0, NULL, NANOKERNEL, - INIT_PRIO_IPM_SEND); +DEVICE_INIT(ipm_console_send0, "ipm_send0", ipm_console_sender_init, + NULL, &sender_config, + NANOKERNEL, INIT_PRIO_IPM_SEND); /* Receiving side of the console IPM driver. These numbers are * more or less arbitrary @@ -78,10 +77,9 @@ struct ipm_console_receiver_config_info receiver_config = { }; struct ipm_console_receiver_runtime_data receiver_data; -DEVICE_INIT_CONFIG_DEFINE(ipm_console_recv0, "ipm_recv0", - ipm_console_receiver_init, &receiver_config); -DEVICE_DEFINE(ipm_console_recv0, &receiver_data, NANOKERNEL, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); +DEVICE_INIT(ipm_console_recv0, "ipm_recv0", ipm_console_receiver_init, + &receiver_data, &receiver_config, + NANOKERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); static const char thestr[] = "everything is awesome\n"; |