aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/samsung-ipc.h9
-rw-r--r--samsung-ipc/ipc.c27
2 files changed, 7 insertions, 29 deletions
diff --git a/include/samsung-ipc.h b/include/samsung-ipc.h
index f35feb7..b1d19be 100644
--- a/include/samsung-ipc.h
+++ b/include/samsung-ipc.h
@@ -93,16 +93,11 @@ char *ipc_client_gprs_get_iface(struct ipc_client *client, int cid);
int ipc_client_gprs_get_capabilities(struct ipc_client *client,
struct ipc_client_gprs_capabilities *cap);
-/* Convenience functions for ipc_send */
-void ipc_client_send(struct ipc_client *client, const unsigned short command,
+int ipc_client_send(struct ipc_client *client, const unsigned short command,
const char type, unsigned char *data, const int length, unsigned char mseq);
-void ipc_client_send_get(struct ipc_client *client,
- const unsigned short command,unsigned char mseq);
-void ipc_client_send_exec(struct ipc_client *client,
- const unsigned short command, unsigned char mseq);
-
int ipc_client_recv(struct ipc_client *client,
struct ipc_message_info *response);
+
void ipc_client_response_free(struct ipc_client *client,
struct ipc_message_info *response);
diff --git a/samsung-ipc/ipc.c b/samsung-ipc/ipc.c
index 4b03ea1..c1da5a4 100644
--- a/samsung-ipc/ipc.c
+++ b/samsung-ipc/ipc.c
@@ -447,33 +447,16 @@ int ipc_client_gprs_get_capabilities(struct ipc_client *client, struct ipc_clien
return client->gprs_specs->gprs_get_capabilities(cap);
}
-int _ipc_client_send(struct ipc_client *client, struct ipc_message_info *request)
+int ipc_client_send(struct ipc_client *client, const unsigned short command,
+ const char type, unsigned char *data, const int length, unsigned char mseq)
{
+ struct ipc_message_info request;
+
if (client == NULL ||
client->ops == NULL ||
client->ops->send == NULL)
return -1;
- return client->ops->send(client, request);
-}
-
-inline void ipc_client_send_get(struct ipc_client *client,
- const unsigned short command, unsigned char mseq)
-{
- ipc_client_send(client, command, IPC_TYPE_GET, 0, 0, mseq);
-}
-
-inline void ipc_client_send_exec(struct ipc_client *client,
- const unsigned short command, unsigned char mseq)
-{
- ipc_client_send(client, command, IPC_TYPE_EXEC, 0, 0, mseq);
-}
-
-void ipc_client_send(struct ipc_client *client, const unsigned short command,
- const char type, unsigned char *data, const int length, unsigned char mseq)
-{
- struct ipc_message_info request;
-
request.mseq = mseq;
request.aseq = 0xff;
request.group = IPC_GROUP(command);
@@ -482,7 +465,7 @@ void ipc_client_send(struct ipc_client *client, const unsigned short command,
request.length = length;
request.data = data;
- _ipc_client_send(client, &request);
+ return client->ops->send(client, &request);
}
int ipc_client_recv(struct ipc_client *client,