Changeset 9be30cdf in mainline
- Timestamp:
- 2013-12-31T02:50:45Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c1ee46f
- Parents:
- 208b5f5
- Location:
- uspace/lib/drv
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/dev_iface.c
r208b5f5 r9be30cdf 69 69 [CLOCK_DEV_IFACE] = &remote_clock_dev_iface, 70 70 [BATTERY_DEV_IFACE] = &remote_battery_dev_iface, 71 [AHCI_DEV_IFACE] = &remote_ahci_iface 71 [AHCI_DEV_IFACE] = &remote_ahci_iface, 72 72 } 73 73 }; -
uspace/lib/drv/generic/remote_ahci.c
r208b5f5 r9be30cdf 36 36 #include <errno.h> 37 37 #include <stdio.h> 38 #include <macros.h> 38 39 #include "ahci_iface.h" 39 40 #include "ddf/driver.h" … … 65 66 66 67 /** Remote AHCI interface operations. */ 67 static remote_iface_func_ptr_t remote_ahci_iface_ops [] = {68 static const remote_iface_func_ptr_t remote_ahci_iface_ops [] = { 68 69 [IPC_M_AHCI_GET_SATA_DEVICE_NAME] = remote_ahci_get_sata_device_name, 69 70 [IPC_M_AHCI_GET_NUM_BLOCKS] = remote_ahci_get_num_blocks, … … 76 77 */ 77 78 remote_iface_t remote_ahci_iface = { 78 .method_count = sizeof(remote_ahci_iface_ops) / 79 sizeof(remote_ahci_iface_ops[0]), 79 .method_count = ARRAY_SIZE(remote_ahci_iface_ops), 80 80 .methods = remote_ahci_iface_ops 81 81 }; -
uspace/lib/drv/generic/remote_audio_mixer.c
r208b5f5 r9be30cdf 37 37 #include <assert.h> 38 38 #include <str.h> 39 #include <macros.h> 39 40 40 41 #include "audio_mixer_iface.h" … … 204 205 205 206 /** Remote audio mixer interface operations. */ 206 static remote_iface_func_ptr_t remote_audio_mixer_iface_ops[] = {207 static const remote_iface_func_ptr_t remote_audio_mixer_iface_ops[] = { 207 208 [IPC_M_AUDIO_MIXER_GET_INFO] = remote_audio_mixer_get_info, 208 209 [IPC_M_AUDIO_MIXER_GET_ITEM_INFO] = remote_audio_mixer_get_item_info, … … 213 214 /** Remote audio mixer interface structure. */ 214 215 remote_iface_t remote_audio_mixer_iface = { 215 .method_count = sizeof(remote_audio_mixer_iface_ops) / 216 sizeof(remote_audio_mixer_iface_ops[0]), 216 .method_count = ARRAY_SIZE(remote_audio_mixer_iface_ops), 217 217 .methods = remote_audio_mixer_iface_ops 218 218 }; -
uspace/lib/drv/generic/remote_audio_pcm.c
r208b5f5 r9be30cdf 38 38 #include <macros.h> 39 39 #include <str.h> 40 #include <as.h>41 40 #include <sys/mman.h> 42 41 … … 611 610 612 611 /** Remote audio pcm buffer interface operations. */ 613 static remote_iface_func_ptr_t remote_audio_pcm_iface_ops[] = {612 static const remote_iface_func_ptr_t remote_audio_pcm_iface_ops[] = { 614 613 [IPC_M_AUDIO_PCM_GET_INFO_STR] = remote_audio_pcm_get_info_str, 615 614 [IPC_M_AUDIO_PCM_QUERY_CAPS] = remote_audio_pcm_query_caps, … … 628 627 /** Remote audio mixer interface structure. */ 629 628 remote_iface_t remote_audio_pcm_iface = { 630 .method_count = sizeof(remote_audio_pcm_iface_ops) / 631 sizeof(remote_audio_pcm_iface_ops[0]), 629 .method_count = ARRAY_SIZE(remote_audio_pcm_iface_ops), 632 630 .methods = remote_audio_pcm_iface_ops 633 631 }; -
uspace/lib/drv/generic/remote_battery_dev.c
r208b5f5 r9be30cdf 38 38 #include <device/battery_dev.h> 39 39 #include <ddf/driver.h> 40 #include <macros.h> 40 41 41 42 static void remote_battery_status_get(ddf_fun_t *, void *, ipc_callid_t, … … 45 46 46 47 /** Remote battery interface operations */ 47 static remote_iface_func_ptr_t remote_battery_dev_iface_ops[] = {48 static const remote_iface_func_ptr_t remote_battery_dev_iface_ops[] = { 48 49 &remote_battery_status_get, 49 50 &remote_battery_charge_level_get, … … 57 58 */ 58 59 remote_iface_t remote_battery_dev_iface = { 59 .method_count = sizeof(remote_battery_dev_iface_ops) / 60 sizeof(remote_iface_func_ptr_t), 60 .method_count = ARRAY_SIZE(remote_battery_dev_iface_ops), 61 61 .methods = remote_battery_dev_iface_ops, 62 62 }; -
uspace/lib/drv/generic/remote_char_dev.c
r208b5f5 r9be30cdf 35 35 #include <async.h> 36 36 #include <errno.h> 37 #include <macros.h> 37 38 38 39 #include "ops/char_dev.h" … … 45 46 46 47 /** Remote character interface operations. */ 47 static remote_iface_func_ptr_t remote_char_dev_iface_ops[] = {48 static const remote_iface_func_ptr_t remote_char_dev_iface_ops[] = { 48 49 &remote_char_read, 49 50 &remote_char_write … … 56 57 */ 57 58 remote_iface_t remote_char_dev_iface = { 58 .method_count = sizeof(remote_char_dev_iface_ops) / 59 sizeof(remote_iface_func_ptr_t), 59 .method_count = ARRAY_SIZE(remote_char_dev_iface_ops), 60 60 .methods = remote_char_dev_iface_ops 61 61 }; -
uspace/lib/drv/generic/remote_clock_dev.c
r208b5f5 r9be30cdf 36 36 #include <errno.h> 37 37 #include <time.h> 38 #include <macros.h> 38 39 39 40 #include <ops/clock_dev.h> … … 46 47 47 48 /** Remote clock interface operations */ 48 static remote_iface_func_ptr_t remote_clock_dev_iface_ops[] = {49 static const remote_iface_func_ptr_t remote_clock_dev_iface_ops[] = { 49 50 &remote_clock_time_get, 50 51 &remote_clock_time_set, … … 57 58 */ 58 59 remote_iface_t remote_clock_dev_iface = { 59 .method_count = sizeof(remote_clock_dev_iface_ops) / 60 sizeof(remote_iface_func_ptr_t), 60 .method_count = ARRAY_SIZE(remote_clock_dev_iface_ops), 61 61 .methods = remote_clock_dev_iface_ops, 62 62 }; -
uspace/lib/drv/generic/remote_graph_dev.c
r208b5f5 r9be30cdf 35 35 #include <errno.h> 36 36 #include <async.h> 37 #include <macros.h> 37 38 38 39 #include "ops/graph_dev.h" … … 41 42 static void remote_graph_connect(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *); 42 43 43 static remote_iface_func_ptr_t remote_graph_dev_iface_ops[] = {44 static const remote_iface_func_ptr_t remote_graph_dev_iface_ops[] = { 44 45 &remote_graph_connect 45 46 }; 46 47 47 48 remote_iface_t remote_graph_dev_iface = { 48 .method_count = sizeof(remote_graph_dev_iface_ops) / 49 sizeof(remote_iface_func_ptr_t), 49 .method_count = ARRAY_SIZE(remote_graph_dev_iface_ops), 50 50 .methods = remote_graph_dev_iface_ops 51 51 }; -
uspace/lib/drv/generic/remote_hw_res.c
r208b5f5 r9be30cdf 36 36 #include <async.h> 37 37 #include <errno.h> 38 #include <macros.h> 38 39 39 40 #include "ops/hw_res.h" … … 49 50 ipc_call_t *); 50 51 51 static remote_iface_func_ptr_t remote_hw_res_iface_ops [] = {52 static const remote_iface_func_ptr_t remote_hw_res_iface_ops [] = { 52 53 [HW_RES_GET_RESOURCE_LIST] = &remote_hw_res_get_resource_list, 53 54 [HW_RES_ENABLE_INTERRUPT] = &remote_hw_res_enable_interrupt, … … 57 58 58 59 remote_iface_t remote_hw_res_iface = { 59 .method_count = sizeof(remote_hw_res_iface_ops) / 60 sizeof(remote_iface_func_ptr_t), 60 .method_count = ARRAY_SIZE(remote_hw_res_iface_ops), 61 61 .methods = remote_hw_res_iface_ops 62 62 }; -
uspace/lib/drv/generic/remote_nic.c
r208b5f5 r9be30cdf 40 40 #include <ipc/services.h> 41 41 #include <sys/time.h> 42 #include <macros.h> 43 42 44 #include "ops/nic.h" 43 45 … … 1198 1200 * 1199 1201 */ 1200 static remote_iface_func_ptr_t remote_nic_iface_ops[] = {1202 static const remote_iface_func_ptr_t remote_nic_iface_ops[] = { 1201 1203 &remote_nic_send_frame, 1202 1204 &remote_nic_callback_create, … … 1249 1251 */ 1250 1252 remote_iface_t remote_nic_iface = { 1251 .method_count = sizeof(remote_nic_iface_ops) / 1252 sizeof(remote_iface_func_ptr_t), 1253 .method_count = ARRAY_SIZE(remote_nic_iface_ops), 1253 1254 .methods = remote_nic_iface_ops 1254 1255 }; -
uspace/lib/drv/generic/remote_pci.c
r208b5f5 r9be30cdf 36 36 #include <async.h> 37 37 #include <errno.h> 38 #include <macros.h> 38 39 39 40 #include "pci_dev_iface.h" … … 49 50 50 51 /** Remote USB interface operations. */ 51 static remote_iface_func_ptr_t remote_pci_iface_ops [] = {52 static const remote_iface_func_ptr_t remote_pci_iface_ops [] = { 52 53 remote_config_space_read_8, 53 54 remote_config_space_read_16, … … 62 63 */ 63 64 remote_iface_t remote_pci_iface = { 64 .method_count = sizeof(remote_pci_iface_ops) / 65 sizeof(remote_pci_iface_ops[0]), 65 .method_count = ARRAY_SIZE(remote_pci_iface_ops), 66 66 .methods = remote_pci_iface_ops 67 67 }; -
uspace/lib/drv/generic/remote_pio_window.c
r208b5f5 r9be30cdf 35 35 #include <async.h> 36 36 #include <errno.h> 37 #include <macros.h> 37 38 38 39 #include "ops/pio_window.h" … … 42 43 ipc_call_t *); 43 44 44 static remote_iface_func_ptr_t remote_pio_window_iface_ops [] = {45 static const remote_iface_func_ptr_t remote_pio_window_iface_ops [] = { 45 46 [PIO_WINDOW_GET] = &remote_pio_window_get 46 47 }; 47 48 48 49 remote_iface_t remote_pio_window_iface = { 49 .method_count = sizeof(remote_pio_window_iface_ops) / 50 sizeof(remote_iface_func_ptr_t), 50 .method_count = ARRAY_SIZE(remote_pio_window_iface_ops), 51 51 .methods = remote_pio_window_iface_ops 52 52 }; -
uspace/lib/drv/generic/remote_usb.c
r208b5f5 r9be30cdf 36 36 #include <async.h> 37 37 #include <errno.h> 38 #include <macros.h> 38 39 39 40 #include "usb_iface.h" … … 107 108 108 109 /** Remote USB interface operations. */ 109 static remote_iface_func_ptr_t remote_usb_iface_ops [] = {110 static const remote_iface_func_ptr_t remote_usb_iface_ops [] = { 110 111 [IPC_M_USB_GET_MY_ADDRESS] = remote_usb_get_my_address, 111 112 [IPC_M_USB_GET_MY_INTERFACE] = remote_usb_get_my_interface, … … 116 117 */ 117 118 remote_iface_t remote_usb_iface = { 118 .method_count = sizeof(remote_usb_iface_ops) / 119 sizeof(remote_usb_iface_ops[0]), 119 .method_count = ARRAY_SIZE(remote_usb_iface_ops), 120 120 .methods = remote_usb_iface_ops 121 121 }; -
uspace/lib/drv/generic/remote_usbhc.c
r208b5f5 r9be30cdf 37 37 #include <errno.h> 38 38 #include <assert.h> 39 #include <macros.h> 39 40 40 41 #include "usbhc_iface.h" … … 334 335 335 336 /** Remote USB host controller interface operations. */ 336 static remote_iface_func_ptr_t remote_usbhc_iface_ops[] = {337 static const remote_iface_func_ptr_t remote_usbhc_iface_ops[] = { 337 338 [IPC_M_USBHC_REQUEST_ADDRESS] = remote_usbhc_request_address, 338 339 [IPC_M_USBHC_RELEASE_ADDRESS] = remote_usbhc_release_address, … … 350 351 */ 351 352 remote_iface_t remote_usbhc_iface = { 352 .method_count = sizeof(remote_usbhc_iface_ops) / 353 sizeof(remote_usbhc_iface_ops[0]), 353 .method_count = ARRAY_SIZE(remote_usbhc_iface_ops), 354 354 .methods = remote_usbhc_iface_ops 355 355 }; -
uspace/lib/drv/generic/remote_usbhid.c
r208b5f5 r9be30cdf 37 37 #include <assert.h> 38 38 #include <stdio.h> 39 #include <macros.h> 39 40 40 41 #include "usbhid_iface.h" … … 48 49 49 50 /** Remote USB HID interface operations. */ 50 static remote_iface_func_ptr_t remote_usbhid_iface_ops [] = {51 static const remote_iface_func_ptr_t remote_usbhid_iface_ops [] = { 51 52 remote_usbhid_get_event_length, 52 53 remote_usbhid_get_event, … … 58 59 */ 59 60 remote_iface_t remote_usbhid_iface = { 60 .method_count = sizeof(remote_usbhid_iface_ops) / 61 sizeof(remote_usbhid_iface_ops[0]), 61 .method_count = ARRAY_SIZE(remote_usbhid_iface_ops), 62 62 .methods = remote_usbhid_iface_ops 63 63 }; -
uspace/lib/drv/include/dev_iface.h
r208b5f5 r9be30cdf 55 55 56 56 typedef struct { 57 size_t method_count;58 remote_iface_func_ptr_t *methods;57 const size_t method_count; 58 const remote_iface_func_ptr_t *methods; 59 59 } remote_iface_t; 60 60
Note:
See TracChangeset
for help on using the changeset viewer.