diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2012-07-04 23:25:21 +0200 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2012-07-04 23:25:21 +0200 |
commit | 645a8aa548c7777134cfb505f5ea85bc4cbdcf19 (patch) | |
tree | e98988f6f60effad0b58fc85a949cba21405d1cb /samsung-ipc/ipc.c | |
parent | 0b6def0105a1c11eeb728f289045412bddfd2bad (diff) | |
download | external_libsamsung-ipc-645a8aa548c7777134cfb505f5ea85bc4cbdcf19.zip external_libsamsung-ipc-645a8aa548c7777134cfb505f5ea85bc4cbdcf19.tar.gz external_libsamsung-ipc-645a8aa548c7777134cfb505f5ea85bc4cbdcf19.tar.bz2 |
Reworked nv_data handling in nv_data_specs, moved some functions to gprs_specs
nv_data:
* Reworked device-specific nv_data passthrough functions
* Moved default values in rfs.h
* Added more specific infos (size, chunk size, secret)
* Applied to xmm6260 device
gprs:
* Moved non-io-related gprs handlers to gprs_specs
* Applied to crespo, aries and xmm6260 devices
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'samsung-ipc/ipc.c')
-rw-r--r-- | samsung-ipc/ipc.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/samsung-ipc/ipc.c b/samsung-ipc/ipc.c index d7a1b67..c1139ec 100644 --- a/samsung-ipc/ipc.c +++ b/samsung-ipc/ipc.c @@ -140,9 +140,10 @@ struct ipc_client* ipc_client_new(int client_type) break; } - client->fs_ops = ipc_devices[device_index].fs_ops; - client->handlers = (struct ipc_handlers *) malloc(sizeof(struct ipc_handlers)); + client->gprs_specs = ipc_devices[device_index].gprs_specs; + client->nv_data_specs = ipc_devices[device_index].nv_data_specs; + client->log_handler = log_handler_default; if (ipc_devices[device_index].handlers != 0) @@ -370,8 +371,7 @@ int ipc_client_gprs_handlers_available(struct ipc_client *client) return -1; if(client->handlers->gprs_activate != NULL && - client->handlers->gprs_deactivate != NULL && - client->handlers->gprs_get_iface != NULL) + client->handlers->gprs_deactivate != NULL) return 1; else return 0; @@ -400,21 +400,21 @@ int ipc_client_gprs_deactivate(struct ipc_client *client) int ipc_client_gprs_get_iface(struct ipc_client *client, char **iface) { if (client == NULL || - client->handlers == NULL || - client->handlers->gprs_get_iface == NULL) + client->gprs_specs == NULL || + client->gprs_specs->gprs_get_iface == NULL) return -1; - return client->handlers->gprs_get_iface(iface); + return client->gprs_specs->gprs_get_iface(iface); } int ipc_client_gprs_get_capabilities(struct ipc_client *client, struct ipc_client_gprs_capabilities *cap) { if (client == NULL || - client->handlers == NULL || - client->handlers->gprs_get_capabilities == NULL) + client->gprs_specs == NULL || + client->gprs_specs->gprs_get_capabilities == NULL) return -1; - return client->handlers->gprs_get_capabilities(cap); + return client->gprs_specs->gprs_get_capabilities(cap); } int _ipc_client_send(struct ipc_client *client, struct ipc_message_info *request) |