diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2013-06-27 12:58:30 +0200 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2013-06-27 12:58:30 +0200 |
commit | b73c6cf5a94e1c7f9be38917f26da37e13fe452e (patch) | |
tree | 569586654512f79d70a1bb065b15b8f9f3373a0e /samsung-ipc/device/galaxys2/galaxys2_ipc.c | |
parent | 0916c6823f2af47257b09899ba62e44eb56eee72 (diff) | |
download | hardware_replicant_libsamsung-ipc-b73c6cf5a94e1c7f9be38917f26da37e13fe452e.tar.gz hardware_replicant_libsamsung-ipc-b73c6cf5a94e1c7f9be38917f26da37e13fe452e.tar.bz2 hardware_replicant_libsamsung-ipc-b73c6cf5a94e1c7f9be38917f26da37e13fe452e.zip |
Rework handlers and ipc functions for better consistency
Detailed list of the changes introduced by this commit:
* Rename ipc_client_bootstrap_modem to ipc_client_bootstrap
* Rename ipc_client_new/free to ipc_client_create/destroy
* Rename log_handler to log_callback and change arguments order
* Remove handlers common data and fd mechanisms
* Set transport, power and gprs common data for handlers
* Add data_create and data_destroy handlers
* Rework arguments order for handlers
* Add poll transport handler
* Remove functions types typedefs
* Remove dumb ipc_client_send_* functions
* Remove ipc_client_gprs_handlers_available
* Adapt device files for the new API changes
* Adapt modemctrl for the new API changes
Change-Id: Ia9ba1045dbbf9f5e31a201aa8629b49019158972
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'samsung-ipc/device/galaxys2/galaxys2_ipc.c')
-rw-r--r-- | samsung-ipc/device/galaxys2/galaxys2_ipc.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/samsung-ipc/device/galaxys2/galaxys2_ipc.c b/samsung-ipc/device/galaxys2/galaxys2_ipc.c index dbaced5..d68cf0d 100644 --- a/samsung-ipc/device/galaxys2/galaxys2_ipc.c +++ b/samsung-ipc/device/galaxys2/galaxys2_ipc.c @@ -30,34 +30,38 @@ #include "xmm6260_ipc.h" #include "galaxys2_loader.h" -struct ipc_ops galaxys2_fmt_ops = { - .send = xmm6260_ipc_fmt_client_send, - .recv = xmm6260_ipc_fmt_client_recv, - .bootstrap = galaxys2_modem_bootstrap, +struct ipc_ops galaxys2_ipc_fmt_ops = { + .bootstrap = galaxys2_ipc_bootstrap, + .send = xmm6260_ipc_fmt_send, + .recv = xmm6260_ipc_fmt_recv, }; -struct ipc_ops galaxys2_rfs_ops = { - .send = xmm6260_ipc_rfs_client_send, - .recv = xmm6260_ipc_rfs_client_recv, +struct ipc_ops galaxys2_ipc_rfs_ops = { .bootstrap = NULL, + .send = xmm6260_ipc_rfs_send, + .recv = xmm6260_ipc_rfs_recv, }; -struct ipc_handlers galaxys2_default_handlers = { - .read = xmm6260_ipc_read, - .write = xmm6260_ipc_write, +struct ipc_handlers galaxys2_ipc_handlers = { .open = xmm6260_ipc_open, .close = xmm6260_ipc_close, + .read = xmm6260_ipc_read, + .write = xmm6260_ipc_write, + .poll = xmm6260_ipc_poll, + .transport_data = NULL, .power_on = xmm6260_ipc_power_on, .power_off = xmm6260_ipc_power_off, - .common_data = NULL, - .common_data_create = xmm6260_ipc_common_data_create, - .common_data_destroy = xmm6260_ipc_common_data_destroy, - .common_data_set_fd = xmm6260_ipc_common_data_set_fd, - .common_data_get_fd = xmm6260_ipc_common_data_get_fd, + .power_data = NULL, + .gprs_activate = NULL, + .gprs_deactivate = NULL, + .gprs_data = NULL, + .data_create = xmm6260_ipc_data_create, + .data_destroy = xmm6260_ipc_data_destroy, }; -struct ipc_gprs_specs galaxys2_gprs_specs = { +struct ipc_gprs_specs galaxys2_ipc_gprs_specs = { .gprs_get_iface = xmm6260_ipc_gprs_get_iface, .gprs_get_capabilities = xmm6260_ipc_gprs_get_capabilities, }; +// vim:ts=4:sw=4:expandtab |