aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.mk1
-rw-r--r--include/Makefile.am1
-rw-r--r--include/wakelock.h27
-rw-r--r--samsung-ipc/Makefile.am1
-rw-r--r--samsung-ipc/device/crespo/crespo_ipc.c9
-rw-r--r--samsung-ipc/device/xmm6260/xmm6260_ipc.c18
-rw-r--r--samsung-ipc/wakelock.c66
7 files changed, 0 insertions, 123 deletions
diff --git a/Android.mk b/Android.mk
index ce35885..07ebe8d 100644
--- a/Android.mk
+++ b/Android.mk
@@ -60,7 +60,6 @@ samsung-ipc_files := \
samsung-ipc/net.c \
samsung-ipc/sec.c \
samsung-ipc/sms.c \
- samsung-ipc/wakelock.c \
samsung-ipc/device/crespo/crespo_ipc.c \
samsung-ipc/device/aries/aries_ipc.c \
samsung-ipc/device/xmm6260/xmm6260_loader.c \
diff --git a/include/Makefile.am b/include/Makefile.am
index 1ffde56..3ea4b55 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -19,5 +19,4 @@ samsung_ipcinclude_HEADERS = \
imei.h \
rfs.h \
gen.h \
- wakelock.h \
$(NULL)
diff --git a/include/wakelock.h b/include/wakelock.h
deleted file mode 100644
index d9dcdae..0000000
--- a/include/wakelock.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This file is part of libsamsung-ipc.
- *
- * Copyright (C) 2012 Alexander Tarasikov <alexander.tarasikov@gmail.com>
- *
- * libsamsung-ipc is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * libsamsung-ipc is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef __SAMSUNG_IPC_WAKELOCK_H__
-#define __SAMSUNG_IPC_WAKELOCK_H__
-
-extern int wake_lock(char *lock_name);
-extern int wake_unlock(char *lock_name);
-
-#endif
diff --git a/samsung-ipc/Makefile.am b/samsung-ipc/Makefile.am
index ea2035f..d303310 100644
--- a/samsung-ipc/Makefile.am
+++ b/samsung-ipc/Makefile.am
@@ -27,7 +27,6 @@ libsamsung_ipc_la_SOURCES = \
gprs.c \
call.c \
net.c \
- wakelock.c \
ipc.h \
ipc_devices.h \
device/crespo/crespo_ipc.c \
diff --git a/samsung-ipc/device/crespo/crespo_ipc.c b/samsung-ipc/device/crespo/crespo_ipc.c
index c903e05..eae60d7 100644
--- a/samsung-ipc/device/crespo/crespo_ipc.c
+++ b/samsung-ipc/device/crespo/crespo_ipc.c
@@ -34,7 +34,6 @@
#include <assert.h>
#include <samsung-ipc.h>
-#include <wakelock.h>
#include "crespo_modem_ctl.h"
#include "crespo_ipc.h"
@@ -339,8 +338,6 @@ int crespo_ipc_fmt_recv(struct ipc_client *client, struct ipc_message_info *resp
memset(response, 0, sizeof(struct ipc_message_info));
- wake_lock("secril_fmt-interface");
-
assert(client->handlers->read != NULL);
bread = client->handlers->read(client->handlers->transport_data, (uint8_t*) &modem_data, sizeof(struct modem_io) + MAX_MODEM_DATA_SIZE);
if (bread < 0)
@@ -376,8 +373,6 @@ int crespo_ipc_fmt_recv(struct ipc_client *client, struct ipc_message_info *resp
ipc_client_log_recv(client, response, __func__);
- wake_unlock("secril_fmt-interface");
-
return 0;
}
@@ -415,8 +410,6 @@ int crespo_ipc_rfs_recv(struct ipc_client *client, struct ipc_message_info *resp
memset(response, 0, sizeof(struct ipc_message_info));
- wake_lock("secril_rfs-interface");
-
assert(client->handlers->read != NULL);
bread = client->handlers->read(client->handlers->transport_data, (uint8_t*) &modem_data, sizeof(struct modem_io) + MAX_MODEM_DATA_SIZE);
if (bread < 0)
@@ -449,8 +442,6 @@ int crespo_ipc_rfs_recv(struct ipc_client *client, struct ipc_message_info *resp
ipc_client_log_recv(client, response, __func__);
- wake_unlock("secril_rfs-interface");
-
return 0;
}
diff --git a/samsung-ipc/device/xmm6260/xmm6260_ipc.c b/samsung-ipc/device/xmm6260/xmm6260_ipc.c
index 2d485ab..b8c1f60 100644
--- a/samsung-ipc/device/xmm6260/xmm6260_ipc.c
+++ b/samsung-ipc/device/xmm6260/xmm6260_ipc.c
@@ -38,7 +38,6 @@
#include <assert.h>
#include <samsung-ipc.h>
-#include <wakelock.h>
#include "ipc.h"
@@ -47,9 +46,6 @@
#include "xmm6260_modemctl.h"
#include "modem_prj.h"
-#define FMT_LOCK_NAME "xmm6260-fmt-lock"
-#define RFS_LOCK_NAME "xmm6260-rfs-lock"
-
int xmm6260_ipc_fmt_send(struct ipc_client *client, struct ipc_message_info *request)
{
struct ipc_header *hdr;
@@ -57,8 +53,6 @@ int xmm6260_ipc_fmt_send(struct ipc_client *client, struct ipc_message_info *req
unsigned char *payload;
size_t frame_length;
- wake_lock(FMT_LOCK_NAME);
-
/* Frame IPC header + payload length */
frame_length = (sizeof(*hdr) + request->length);
@@ -83,8 +77,6 @@ int xmm6260_ipc_fmt_send(struct ipc_client *client, struct ipc_message_info *req
free(frame);
- wake_unlock(FMT_LOCK_NAME);
-
return 0;
}
@@ -104,8 +96,6 @@ int xmm6260_ipc_fmt_recv(struct ipc_client *client, struct ipc_message_info *res
if (!client || !response)
return -1;
- wake_lock(FMT_LOCK_NAME);
-
num_read = client->handlers->read(client->handlers->transport_data, buf, IPC_MAX_XFER);
if (num_read <= 0) {
@@ -140,7 +130,6 @@ int xmm6260_ipc_fmt_recv(struct ipc_client *client, struct ipc_message_info *res
ipc_client_log_recv(client, response, __func__);
done:
- wake_unlock(FMT_LOCK_NAME);
return 0;
}
@@ -153,8 +142,6 @@ int xmm6260_ipc_rfs_recv(struct ipc_client *client, struct ipc_message_info *res
int rc;
int ret = 0;
- wake_lock(RFS_LOCK_NAME);
-
do {
rc = client->handlers->read(client->handlers->transport_data, buf, IPC_MAX_XFER);
@@ -207,8 +194,6 @@ int xmm6260_ipc_rfs_recv(struct ipc_client *client, struct ipc_message_info *res
ipc_client_log_recv(client, response, __func__);
done:
-
- wake_unlock(RFS_LOCK_NAME);
return ret;
}
@@ -219,8 +204,6 @@ int xmm6260_ipc_rfs_send(struct ipc_client *client, struct ipc_message_info *req
int data_length;
int rc;
- wake_lock(RFS_LOCK_NAME);
-
data_length = sizeof(struct rfs_hdr) + request->length;
data = malloc(data_length);
memset(data, 0, data_length);
@@ -236,7 +219,6 @@ int xmm6260_ipc_rfs_send(struct ipc_client *client, struct ipc_message_info *req
rc = client->handlers->write(client->handlers->transport_data, data, data_length);
- wake_unlock(RFS_LOCK_NAME);
return rc;
}
diff --git a/samsung-ipc/wakelock.c b/samsung-ipc/wakelock.c
deleted file mode 100644
index 2e42671..0000000
--- a/samsung-ipc/wakelock.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * This file is part of libsamsung-ipc.
- *
- * Copyright (C) 2012 Alexander Tarasikov <alexander.tarasikov@gmail.com>
- *
- * libsamsung-ipc is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * libsamsung-ipc is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-
-#include <wakelock.h>
-
-static int wake_lock_fd = -1;
-static int wake_unlock_fd = -1;
-
-int wake_lock(char *lock_name)
-{
- int rc;
-
- if (lock_name == NULL)
- return -1;
-
- if (wake_lock_fd < 0)
- wake_lock_fd = open("/sys/power/wake_lock", O_RDWR);
-
- if (wake_lock_fd < 0)
- return wake_lock_fd;
-
- rc = write(wake_lock_fd, lock_name, strlen(lock_name));
-
- return rc;
-}
-
-int wake_unlock(char *lock_name)
-{
- int rc;
-
- if (lock_name == NULL)
- return -1;
-
- if (wake_unlock_fd < 0)
- wake_unlock_fd = open("/sys/power/wake_unlock", O_RDWR);
-
- if (wake_unlock_fd < 0)
- return wake_lock_fd;
-
- rc = write(wake_unlock_fd, lock_name, strlen(lock_name));
-
- return rc;
-}
-
-// vim:ts=4:sw=4:expandtab