diff mbox series

[5/8] qmi: gprs: Remove magic number use

Message ID 20240506203952.55806-5-denkenz@gmail.com (mailing list archive)
State Superseded
Headers show
Series [1/8] qmi: wds: Fix up enum naming | expand

Commit Message

Denis Kenzior May 6, 2024, 8:39 p.m. UTC
---
 drivers/qmimodem/gprs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/qmimodem/gprs.c b/drivers/qmimodem/gprs.c
index fce975def9c2..2a0d52317cbb 100644
--- a/drivers/qmimodem/gprs.c
+++ b/drivers/qmimodem/gprs.c
@@ -70,6 +70,7 @@  static bool extract_ss_info(struct qmi_result *result, int *status, int *tech)
 
 static void get_lte_attach_param_cb(struct qmi_result *result, void *user_data)
 {
+	static const uint8_t PARAM_APN = 0x10;
 	struct ofono_gprs *gprs = user_data;
 	struct gprs_data *data = ofono_gprs_get_data(gprs);
 	char *apn = NULL;
@@ -83,7 +84,7 @@  static void get_lte_attach_param_cb(struct qmi_result *result, void *user_data)
 	}
 
 	/* APN */
-	apn = qmi_result_get_string(result, 0x10);
+	apn = qmi_result_get_string(result, PARAM_APN);
 	if (!apn) {
 		DBG("Default profile has no APN setting");
 		goto noapn;