aboutsummaryrefslogtreecommitdiffstats
path: root/samsung-ipc/devices
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2014-02-15 12:03:32 +0100
committerPaul Kocialkowski <contact@paulk.fr>2014-02-15 12:03:32 +0100
commitec82c3a5350b8747e1c0a7a0393ab0374dd9fbd5 (patch)
tree0256ae15b2cc668160ce58300b016cc044e391a6 /samsung-ipc/devices
parent39ac0d29e1062a28528e94756e16a2e856eb3b49 (diff)
downloadexternal_libsamsung-ipc-ec82c3a5350b8747e1c0a7a0393ab0374dd9fbd5.zip
external_libsamsung-ipc-ec82c3a5350b8747e1c0a7a0393ab0374dd9fbd5.tar.gz
external_libsamsung-ipc-ec82c3a5350b8747e1c0a7a0393ab0374dd9fbd5.tar.bz2
rfs: Consistent coding style, cleanup and fresh new implementation
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'samsung-ipc/devices')
-rw-r--r--samsung-ipc/devices/xmm6160/xmm6160.c21
-rw-r--r--samsung-ipc/devices/xmm6260/xmm6260_hsic.c22
-rw-r--r--samsung-ipc/devices/xmm6260/xmm6260_mipi.c22
3 files changed, 12 insertions, 53 deletions
diff --git a/samsung-ipc/devices/xmm6160/xmm6160.c b/samsung-ipc/devices/xmm6160/xmm6160.c
index f0aa05b..2c4d64b 100644
--- a/samsung-ipc/devices/xmm6160/xmm6160.c
+++ b/samsung-ipc/devices/xmm6160/xmm6160.c
@@ -238,29 +238,16 @@ int xmm6160_nv_data_send(struct ipc_client *client, int device_fd,
if (client == NULL || (device_fd < 0 && device_address == NULL))
return -1;
- rc = nv_data_check(client);
- if (rc < 0) {
- ipc_client_log(client, "Checking nv_data failed");
- goto error;
- }
- ipc_client_log(client, "Checked nv_data");
-
- rc = nv_data_md5_check(client);
- if (rc < 0) {
- ipc_client_log(client, "Checking nv_data md5 failed");
- goto error;
- }
- ipc_client_log(client, "Checked nv_data md5");
+ nv_size = ipc_client_nv_data_size(client);
- nv_data = file_data_read(ipc_client_nv_data_path(client), ipc_client_nv_data_size(client), ipc_client_nv_data_chunk_size(client), 0);
+ nv_data = ipc_nv_data_load(client);
if (nv_data == NULL) {
- ipc_client_log(client, "Reading nv_data failed");
+ ipc_client_log(client, "Loading nv_data failed");
goto error;
}
- ipc_client_log(client, "Read nv_data");
+ ipc_client_log(client, "Loaded nv_data");
p = (unsigned char *) nv_data;
- nv_size = ipc_client_nv_data_size(client);
if (device_address != NULL) {
memcpy(device_address, p, nv_size);
diff --git a/samsung-ipc/devices/xmm6260/xmm6260_hsic.c b/samsung-ipc/devices/xmm6260/xmm6260_hsic.c
index d53ff11..747ebd1 100644
--- a/samsung-ipc/devices/xmm6260/xmm6260_hsic.c
+++ b/samsung-ipc/devices/xmm6260/xmm6260_hsic.c
@@ -547,28 +547,14 @@ int xmm6260_hsic_nv_data_send(struct ipc_client *client, int device_fd)
if (client == NULL || device_fd < 0)
return -1;
- rc = nv_data_check(client);
- if (rc < 0) {
- ipc_client_log(client, "Checking nv_data failed");
- goto error;
- }
- ipc_client_log(client, "Checked nv_data");
-
- rc = nv_data_md5_check(client);
- if (rc < 0) {
- ipc_client_log(client, "Checking nv_data md5 failed");
- goto error;
- }
- ipc_client_log(client, "Checked nv_data md5");
+ nv_size = ipc_client_nv_data_size(client);
- nv_data = file_data_read(ipc_client_nv_data_path(client), ipc_client_nv_data_size(client), ipc_client_nv_data_chunk_size(client), 0);
+ nv_data = ipc_nv_data_load(client);
if (nv_data == NULL) {
- ipc_client_log(client, "Reading nv_data failed");
+ ipc_client_log(client, "Loading nv_data failed");
goto error;
}
- ipc_client_log(client, "Read nv_data");
-
- nv_size = ipc_client_nv_data_size(client);
+ ipc_client_log(client, "Loaded nv_data");
rc = xmm6260_hsic_modem_data_send(device_fd, nv_data, nv_size, XMM6260_NV_DATA_ADDRESS);
if (rc < 0)
diff --git a/samsung-ipc/devices/xmm6260/xmm6260_mipi.c b/samsung-ipc/devices/xmm6260/xmm6260_mipi.c
index 06a2b90..a14fd20 100644
--- a/samsung-ipc/devices/xmm6260/xmm6260_mipi.c
+++ b/samsung-ipc/devices/xmm6260/xmm6260_mipi.c
@@ -597,28 +597,14 @@ int xmm6260_mipi_nv_data_send(struct ipc_client *client, int device_fd)
if (client == NULL || device_fd < 0)
return -1;
- rc = nv_data_check(client);
- if (rc < 0) {
- ipc_client_log(client, "Checking nv_data failed");
- goto error;
- }
- ipc_client_log(client, "Checked nv_data");
-
- rc = nv_data_md5_check(client);
- if (rc < 0) {
- ipc_client_log(client, "Checking nv_data md5 failed");
- goto error;
- }
- ipc_client_log(client, "Checked nv_data md5");
+ nv_size = ipc_client_nv_data_size(client);
- nv_data = file_data_read(ipc_client_nv_data_path(client), ipc_client_nv_data_size(client), ipc_client_nv_data_chunk_size(client), 0);
+ nv_data = ipc_nv_data_load(client);
if (nv_data == NULL) {
- ipc_client_log(client, "Reading nv_data failed");
+ ipc_client_log(client, "Loading nv_data failed");
goto error;
}
- ipc_client_log(client, "Read nv_data");
-
- nv_size = ipc_client_nv_data_size(client);
+ ipc_client_log(client, "Loaded nv_data");
rc = xmm6260_mipi_modem_data_send(device_fd, nv_data, nv_size, XMM6260_NV_DATA_ADDRESS);
if (rc < 0)