summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-02-23 21:48:58 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-09-21 18:12:49 +0200
commit5104013b24ed19659816a9d8aca6884040ef72aa (patch)
tree17b31ba097edcb772e3ccb6acdd5565e578a3382
parentb7198d5ea497dd43c7d02b333b5efe2c7b6b6bf7 (diff)
downloadhardware_replicant_libsamsung-ril-cleanups.tar.gz
hardware_replicant_libsamsung-ril-cleanups.tar.bz2
hardware_replicant_libsamsung-ril-cleanups.zip
samsung-ril: fix lines over 80 characterscleanups
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r--samsung-ril.c8
-rw-r--r--samsung-ril.h47
2 files changed, 39 insertions, 16 deletions
diff --git a/samsung-ril.c b/samsung-ril.c
index aaeedeb..cd9303e 100644
--- a/samsung-ril.c
+++ b/samsung-ril.c
@@ -1573,7 +1573,9 @@ const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env,
rc = ril_client_create(ril_clients[i]);
if (rc < 0)
- /* ril_client_create already prints an error if it fails */
+ /* ril_client_create already prints an error if it
+ * fails
+ */
goto error;
}
@@ -1607,7 +1609,9 @@ const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env,
rc = ril_client_loop(ril_clients[i]);
if (rc < 0)
- /* ril_client_loop already prints an error if it fails */
+ /* ril_client_loop already prints an error if it
+ * fails
+ */
goto error;
}
diff --git a/samsung-ril.h b/samsung-ril.h
index 8cc012d..38de4b4 100644
--- a/samsung-ril.h
+++ b/samsung-ril.h
@@ -77,14 +77,29 @@
#error "Cannot define RIL_LOGE"
#endif
-#define RIL_LOCK() pthread_mutex_lock(&ril_data->mutex)
-#define RIL_UNLOCK() pthread_mutex_unlock(&ril_data->mutex)
-#define RIL_REQUEST_LOCK() pthread_mutex_lock(&ril_data->request_mutex)
-#define RIL_REQUEST_UNLOCK() pthread_mutex_unlock(&ril_data->request_mutex)
-#define RIL_REQUEST_LOOP_LOCK() pthread_mutex_lock(&ril_data->request_loop_mutex)
-#define RIL_REQUEST_LOOP_UNLOCK() pthread_mutex_unlock(&ril_data->request_loop_mutex)
-#define RIL_CLIENT_LOCK(client) pthread_mutex_lock(&client->mutex)
-#define RIL_CLIENT_UNLOCK(client) pthread_mutex_unlock(&client->mutex)
+#define RIL_LOCK() \
+ pthread_mutex_lock(&ril_data->mutex)
+
+#define RIL_UNLOCK() \
+ pthread_mutex_unlock(&ril_data->mutex)
+
+#define RIL_REQUEST_LOCK() \
+ pthread_mutex_lock(&ril_data->request_mutex)
+
+#define RIL_REQUEST_UNLOCK() \
+ pthread_mutex_unlock(&ril_data->request_mutex)
+
+#define RIL_REQUEST_LOOP_LOCK() \
+ pthread_mutex_lock(&ril_data->request_loop_mutex)
+
+#define RIL_REQUEST_LOOP_UNLOCK() \
+ pthread_mutex_unlock(&ril_data->request_loop_mutex)
+
+#define RIL_CLIENT_LOCK(client) \
+ pthread_mutex_lock(&client->mutex)
+
+#define RIL_CLIENT_UNLOCK(client) \
+ pthread_mutex_unlock(&client->mutex)
/*
* RIL client
@@ -107,8 +122,10 @@ struct ril_client_handlers {
};
struct ril_client_callbacks {
- int (*request_register)(struct ril_client *client, int request, RIL_Token token);
- int (*request_unregister)(struct ril_client *client, int request, RIL_Token token);
+ int (*request_register)(struct ril_client *client, int request,
+ RIL_Token token);
+ int (*request_unregister)(struct ril_client *client, int request,
+ RIL_Token token);
int (*flush)(struct ril_client *client);
};
@@ -483,11 +500,13 @@ int ipc_gen_phone_res_expect_register(struct ril_client *client,
int ipc_gen_phone_res_expect_unregister(struct ril_client *client,
struct ipc_gen_phone_res_expect *expect);
int ipc_gen_phone_res_expect_flush(struct ril_client *client);
-struct ipc_gen_phone_res_expect *ipc_gen_phone_res_expect_find_aseq(struct ril_client *client,
- unsigned char aseq);
-int ipc_gen_phone_res_expect_callback(unsigned char aseq, unsigned short command,
+struct ipc_gen_phone_res_expect *ipc_gen_phone_res_expect_find_aseq(
+ struct ril_client *client, unsigned char aseq);
+int ipc_gen_phone_res_expect_callback(
+ unsigned char aseq, unsigned short command,
int (*callback)(struct ipc_message *message));
-int ipc_gen_phone_res_expect_complete(unsigned char aseq, unsigned short command);
+int ipc_gen_phone_res_expect_complete(unsigned char aseq,
+ unsigned short command);
int ipc_gen_phone_res_expect_abort(unsigned char aseq, unsigned short command);
int ipc_gen_phone_res(struct ipc_message *message);