]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
soc: qcom: pdr: Use the unified QMI service ID instead of defining it locally
authorDaniel Lezcano <daniel.lezcano@oss.qualcomm.com>
Mon, 9 Mar 2026 23:03:35 +0000 (00:03 +0100)
committerBjorn Andersson <andersson@kernel.org>
Mon, 16 Mar 2026 01:54:39 +0000 (20:54 -0500)
Instead of defining a local macro with a custom name for the QMI
service identifier, use the one provided in qmi.h and remove the
locally defined macro.

Signed-off-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260309230346.3584252-7-daniel.lezcano@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/soc/qcom/pdr_interface.c
drivers/soc/qcom/pdr_internal.h
drivers/soc/qcom/qcom_pd_mapper.c

index 72259f489075f226a02195af8400aa855fccc1eb..6d879e1540b0a43c2db18b83cf4f6c54af4acb10 100644 (file)
@@ -523,7 +523,7 @@ struct pdr_service *pdr_add_lookup(struct pdr_handle *pdr,
        if (!pds)
                return ERR_PTR(-ENOMEM);
 
-       pds->service = SERVREG_NOTIFIER_SERVICE;
+       pds->service = QMI_SERVICE_ID_SERVREG_NOTIF;
        strscpy(pds->service_name, service_name, sizeof(pds->service_name));
        strscpy(pds->service_path, service_path, sizeof(pds->service_path));
        pds->need_locator_lookup = true;
@@ -678,7 +678,7 @@ struct pdr_handle *pdr_handle_alloc(void (*status)(int state,
        if (ret < 0)
                goto destroy_indack;
 
-       ret = qmi_add_lookup(&pdr->locator_hdl, SERVREG_LOCATOR_SERVICE, 1, 1);
+       ret = qmi_add_lookup(&pdr->locator_hdl, QMI_SERVICE_ID_SERVREG_LOC, 1, 1);
        if (ret < 0)
                goto release_qmi_handle;
 
index 039508c1bbf7d0b2e9e60114b6c05926211f6ca2..6cd8cbe2682288e02c59afbc16b20560151e1417 100644 (file)
@@ -4,9 +4,6 @@
 
 #include <linux/soc/qcom/pdr.h>
 
-#define SERVREG_LOCATOR_SERVICE                                0x40
-#define SERVREG_NOTIFIER_SERVICE                       0x42
-
 #define SERVREG_REGISTER_LISTENER_REQ                  0x20
 #define SERVREG_GET_DOMAIN_LIST_REQ                    0x21
 #define SERVREG_STATE_UPDATED_IND_ID                   0x22
index c54b3cec508d95767ab1fe8e5d7e917a1ca06595..21e4dd594295be4a14a954ef6f89981a4ee910e6 100644 (file)
@@ -661,7 +661,7 @@ static struct qcom_pdm_data *qcom_pdm_start(void)
                        goto err_stop;
        }
 
-       ret = qmi_add_server(&data->handle, SERVREG_LOCATOR_SERVICE,
+       ret = qmi_add_server(&data->handle, QMI_SERVICE_ID_SERVREG_LOC,
                             SERVREG_QMI_VERSION, SERVREG_QMI_INSTANCE);
        if (ret) {
                pr_err("PDM: error adding server %d\n", ret);