summaryrefslogtreecommitdiffstats
path: root/drivers/atmodem/atutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/atmodem/atutil.h')
-rw-r--r--drivers/atmodem/atutil.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/atmodem/atutil.h b/drivers/atmodem/atutil.h
index 06d7fc31..c30c70b7 100644
--- a/drivers/atmodem/atutil.h
+++ b/drivers/atmodem/atutil.h
@@ -48,3 +48,12 @@ static inline struct cb_data *cb_data_new(void *cb, void *data)
e.type = OFONO_ERROR_TYPE_FAILURE; \
e.error = 0 \
+#define CALLBACK_WITH_FAILURE(cb, args...) \
+ do { \
+ struct ofono_error cb_e; \
+ cb_e.type = OFONO_ERROR_TYPE_FAILURE; \
+ cb_e.error = 0; \
+ \
+ cb(&cb_e, ##args); \
+ } while (0) \
+