[Replicant] [libsamsung-ipc] [PATCH 02/11] modems: xmm626: use modem_data_send

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Sun Oct 11 22:22:13 UTC 2020


Now that we have the modem_data_send abstraction, we can replace all
the mm626_{hsic/hsic}_modem_data_send instances by it.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
 samsung-ipc/modems/xmm626/xmm626_hsic.c | 10 +++++-----
 samsung-ipc/modems/xmm626/xmm626_mipi.c | 14 +++++++-------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/samsung-ipc/modems/xmm626/xmm626_hsic.c b/samsung-ipc/modems/xmm626/xmm626_hsic.c
index 50cfc0e..a59d41a 100644
--- a/samsung-ipc/modems/xmm626/xmm626_hsic.c
+++ b/samsung-ipc/modems/xmm626/xmm626_hsic.c
@@ -30,6 +30,7 @@
 #include <samsung-ipc.h>
 
 #include "ipc.h"
+#include "modems/modem.h"
 #include "modems/xmm626/xmm626.h"
 #include "modems/xmm626/xmm626_hsic.h"
 #include "modems/xmm626/xmm626_mipi.h"
@@ -550,9 +551,8 @@ int xmm626_hsic_firmware_send(struct ipc_client *client, int device_fd,
 		return -1;
 	}
 
-	rc = xmm626_hsic_modem_data_send(client, device_fd, firmware_data,
-					 firmware_size,
-					 XMM626_FIRMWARE_ADDRESS);
+	rc = modem_data_send(client, device_fd, firmware_data,
+				    firmware_size, XMM626_FIRMWARE_ADDRESS);
 	if (rc < 0)
 		return -1;
 
@@ -579,8 +579,8 @@ int xmm626_hsic_nv_data_send(struct ipc_client *client, int device_fd)
 	}
 	ipc_client_log(client, "Loaded nv_data");
 
-	rc = xmm626_hsic_modem_data_send(client, device_fd, nv_data, nv_size,
-					 XMM626_NV_DATA_ADDRESS);
+	rc = modem_data_send(client, device_fd, nv_data, nv_size,
+				    XMM626_NV_DATA_ADDRESS);
 	if (rc < 0)
 		goto error;
 
diff --git a/samsung-ipc/modems/xmm626/xmm626_mipi.c b/samsung-ipc/modems/xmm626/xmm626_mipi.c
index 0fedad6..e143ac7 100644
--- a/samsung-ipc/modems/xmm626/xmm626_mipi.c
+++ b/samsung-ipc/modems/xmm626/xmm626_mipi.c
@@ -30,6 +30,7 @@
 #include <samsung-ipc.h>
 
 #include "ipc.h"
+#include "modems/modem.h"
 #include "modems/xmm626/xmm626.h"
 #include "modems/xmm626/xmm626_mipi.h"
 
@@ -594,9 +595,8 @@ int xmm626_mipi_firmware_send(struct ipc_client *client, int device_fd,
 		return -1;
 	}
 
-	rc = xmm626_mipi_modem_data_send(client, device_fd, firmware_data,
-					 firmware_size,
-					 XMM626_FIRMWARE_ADDRESS);
+	rc = modem_data_send(client, device_fd, firmware_data,
+				    firmware_size, XMM626_FIRMWARE_ADDRESS);
 	if (rc < 0)
 		return -1;
 
@@ -623,8 +623,8 @@ int xmm626_mipi_nv_data_send(struct ipc_client *client, int device_fd)
 	}
 	ipc_client_log(client, "Loaded nv_data");
 
-	rc = xmm626_mipi_modem_data_send(client, device_fd, nv_data, nv_size,
-					 XMM626_NV_DATA_ADDRESS);
+	rc = modem_data_send(client, device_fd, nv_data, nv_size,
+			     XMM626_NV_DATA_ADDRESS);
 	if (rc < 0)
 		goto error;
 
@@ -651,8 +651,8 @@ int xmm626_mipi_mps_data_send(struct ipc_client *client, int device_fd,
 		return -1;
 	}
 
-	rc = xmm626_mipi_modem_data_send(client, device_fd, mps_data, mps_size,
-					 XMM626_MPS_DATA_ADDRESS);
+	rc = modem_data_send(client, device_fd, mps_data, mps_size,
+			     XMM626_MPS_DATA_ADDRESS);
 	if (rc < 0)
 		return -1;
 
-- 
2.28.0



More information about the Replicant mailing list