diff mbox series

[v2,06/11] qmi: Enable _auto_ use for some classes

Message ID 20240711164654.1688558-6-denkenz@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show
Series [v2,01/11] udevng: Remove gps from setup_gobi | expand

Commit Message

Denis Kenzior July 11, 2024, 4:46 p.m. UTC
This enables ell _auto_ keyword use with qmi_service_free and
qmi_param_free.
---
 drivers/qmimodem/qmi.h | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/drivers/qmimodem/qmi.h b/drivers/qmimodem/qmi.h
index 0e48313ebb64..69698ee049c6 100644
--- a/drivers/qmimodem/qmi.h
+++ b/drivers/qmimodem/qmi.h
@@ -5,6 +5,8 @@ 
  * SPDX-License-Identifier: GPL-2.0-only
  */
 
+#include <ell/cleanup.h>
+
 #include <stdbool.h>
 #include <stdint.h>
 
@@ -110,6 +112,8 @@  struct qmi_param;
 struct qmi_param *qmi_param_new(void);
 void qmi_param_free(struct qmi_param *param);
 
+DEFINE_CLEANUP_FUNC(qmi_param_free)
+
 bool qmi_param_append(struct qmi_param *param, uint8_t type,
 					uint16_t length, const void *data);
 bool qmi_param_append_uint8(struct qmi_param *param, uint8_t type,
@@ -146,6 +150,8 @@  int qmi_error_to_ofono_cme(int qmi_error);
 struct qmi_service *qmi_service_clone(struct qmi_service *service);
 void qmi_service_free(struct qmi_service *service);
 
+DEFINE_CLEANUP_FUNC(qmi_service_free)
+
 const char *qmi_service_get_identifier(struct qmi_service *service);
 bool qmi_service_get_version(struct qmi_service *service, uint8_t *out_version);