diff options
author | Simon Busch <morphis@gravedo.de> | 2012-02-03 20:39:07 +0100 |
---|---|---|
committer | Simon Busch <morphis@gravedo.de> | 2012-02-03 20:39:07 +0100 |
commit | 303fbc0cd4430fdf656c711a0060cbc07ff6556c (patch) | |
tree | a7ccd3957ee906265d08289ea574c55d341be668 | |
parent | e8bec379a346442f3719eb3e76fbf79697622754 (diff) | |
download | external_libsamsung-ipc-303fbc0cd4430fdf656c711a0060cbc07ff6556c.zip external_libsamsung-ipc-303fbc0cd4430fdf656c711a0060cbc07ff6556c.tar.gz external_libsamsung-ipc-303fbc0cd4430fdf656c711a0060cbc07ff6556c.tar.bz2 |
Adjust for recent changes to device creation structure
Signed-off-by: Simon Busch <morphis@gravedo.de>
-rw-r--r-- | samsung-ipc/device/aries/aries_ipc.c | 6 | ||||
-rw-r--r-- | samsung-ipc/device/crespo/crespo_ipc.c | 6 | ||||
-rw-r--r-- | samsung-ipc/ipc.c | 41 | ||||
-rw-r--r-- | samsung-ipc/ipc_private.h | 2 | ||||
-rw-r--r-- | tools/modemctrl.c | 2 | ||||
-rw-r--r-- | vapi/samsung-ipc-1.0.vapi | 5 |
6 files changed, 1 insertions, 61 deletions
diff --git a/samsung-ipc/device/aries/aries_ipc.c b/samsung-ipc/device/aries/aries_ipc.c index 5010017..7f6749d 100644 --- a/samsung-ipc/device/aries/aries_ipc.c +++ b/samsung-ipc/device/aries/aries_ipc.c @@ -941,10 +941,4 @@ struct ipc_ops aries_rfs_ops = { .bootstrap = NULL, }; -void aries_ipc_register(void) -{ - ipc_register_device_client_handlers(IPC_DEVICE_ARIES, &aries_fmt_ops, - &aries_rfs_ops, &aries_default_handlers); -} - // vim:ts=4:sw=4:expandtab diff --git a/samsung-ipc/device/crespo/crespo_ipc.c b/samsung-ipc/device/crespo/crespo_ipc.c index 0ce7830..556d77c 100644 --- a/samsung-ipc/device/crespo/crespo_ipc.c +++ b/samsung-ipc/device/crespo/crespo_ipc.c @@ -717,10 +717,4 @@ struct ipc_ops crespo_rfs_ops = { .bootstrap = NULL, }; -void crespo_ipc_register(void) -{ - ipc_register_device_client_handlers(IPC_DEVICE_CRESPO, &crespo_fmt_ops, - &crespo_rfs_ops, &crespo_default_handlers); -} - // vim:ts=4:sw=4:expandtab diff --git a/samsung-ipc/ipc.c b/samsung-ipc/ipc.c index 91ee455..67a9cfe 100644 --- a/samsung-ipc/ipc.c +++ b/samsung-ipc/ipc.c @@ -45,14 +45,6 @@ void log_handler_default(const char *message, void *user_data) printf("%s\n", message); } -void ipc_register_device_client_handlers(int device, struct ipc_ops *fmt_ops, - struct ipc_ops *rfs_ops, struct ipc_handlers *handlers) -{ - devices[device].fmt_ops = fmt_ops; - devices[device].rfs_ops = rfs_ops; - devices[device].handlers = handlers; -} - void ipc_client_log(struct ipc_client *client, const char *message, ...) { assert(client->log_handler != NULL); @@ -80,7 +72,7 @@ int ipc_device_detect(void) break; } } -#else +#else char buf[4096]; // gather device type from /proc/cpuinfo @@ -113,37 +105,6 @@ int ipc_device_detect(void) struct ipc_client* ipc_client_new(int client_type) { - int device_type = -1, in_hardware = 0; - char buf[4096]; - - // gather device type from /proc/cpuinfo - int fd = open("/proc/cpuinfo", O_RDONLY); - int bytesread = read(fd, buf, 4096); - close(fd); - - // match hardware name with our supported devices - char *pch = strtok(buf, "\n"); - while (pch != NULL) - { - int rc; - if ((rc = strncmp(pch, "Hardware", 9)) == 9) - { - if (strstr(pch, "herring") != NULL) - device_type = IPC_DEVICE_CRESPO; - // FIXME add detection for aries based devices - } - pch = strtok(NULL, "\n"); - } - - // validate that we have found any supported device - if (device_type == -1) - return NULL; - - return ipc_client_new_for_device(device_type, client_type); -} - -struct ipc_client* ipc_client_new_for_device(int device_type, int client_type) -{ struct ipc_client *client; int device_index = -1; diff --git a/samsung-ipc/ipc_private.h b/samsung-ipc/ipc_private.h index ac8db78..a296260 100644 --- a/samsung-ipc/ipc_private.h +++ b/samsung-ipc/ipc_private.h @@ -66,8 +66,6 @@ struct ipc_client { }; void ipc_client_log(struct ipc_client *client, const char *message, ...); -void ipc_register_device_client_handlers(int device, struct ipc_ops *fmt_ops, - struct ipc_ops *rfs_ops, struct ipc_handlers *handlers); #endif diff --git a/tools/modemctrl.c b/tools/modemctrl.c index d96a751..891bfd7 100644 --- a/tools/modemctrl.c +++ b/tools/modemctrl.c @@ -528,7 +528,6 @@ int main(int argc, char *argv[]) } } - ipc_init(); client_fmt = ipc_client_new(IPC_CLIENT_TYPE_FMT); if (client_fmt == 0) { @@ -577,7 +576,6 @@ int main(int argc, char *argv[]) modem_quit: if (client_fmt != 0) ipc_client_free(client_fmt); - ipc_shutdown(); return 0; } diff --git a/vapi/samsung-ipc-1.0.vapi b/vapi/samsung-ipc-1.0.vapi index ebef347..432a87f 100644 --- a/vapi/samsung-ipc-1.0.vapi +++ b/vapi/samsung-ipc-1.0.vapi @@ -1200,11 +1200,6 @@ namespace SamsungIpc public delegate int TransportCb(uint8[] data); public delegate void LogHandlerCb(string message); - [CCode (cname = "ipc_init")] - public void init(); - [CCode (cname = "ipc_shutdown")] - public void shutdown(); - [Compact] [CCode (cname = "struct ipc_client", cprefix = "ipc_client_")] public class Client |