From 415906e82255420b3b2115a82424c4deb9a2735a Mon Sep 17 00:00:00 2001 From: Marcin Maka Date: Mon, 23 Mar 2020 20:59:43 +0100 Subject: [PATCH] comp: rename private field to priv_data Another cpp keyword that confuses documentation generation process. Signed-off-by: Marcin Maka --- src/include/sof/audio/component.h | 6 +++--- test/cmocka/src/audio/mixer/mixer_test.c | 2 +- test/cmocka/src/audio/mux/mux_get_processing_function.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/include/sof/audio/component.h b/src/include/sof/audio/component.h index 02c067875..9ed317143 100644 --- a/src/include/sof/audio/component.h +++ b/src/include/sof/audio/component.h @@ -433,7 +433,7 @@ struct comp_dev { struct list_item bsink_list; /**< list of sink buffers */ /* private data - core does not touch this */ - void *private; /**< private data */ + void *priv_data; /**< private data */ /** * IPC config object header - MUST be at end as it's @@ -535,7 +535,7 @@ static inline struct sof_ipc_comp_config *comp_config(struct sof_ipc_comp *comp) * @param data Private data. */ #define comp_set_drvdata(c, data) \ - (c->private = data) + (c->priv_data = data) /** * \brief Retrieves driver private data from component device. @@ -543,7 +543,7 @@ static inline struct sof_ipc_comp_config *comp_config(struct sof_ipc_comp *comp) * @return Private data. */ #define comp_get_drvdata(c) \ - c->private + c->priv_data #ifdef UNIT_TEST #define DECLARE_MODULE(init) diff --git a/test/cmocka/src/audio/mixer/mixer_test.c b/test/cmocka/src/audio/mixer/mixer_test.c index dee7c8d93..46b2f0d0a 100644 --- a/test/cmocka/src/audio/mixer/mixer_test.c +++ b/test/cmocka/src/audio/mixer/mixer_test.c @@ -246,7 +246,7 @@ static int test_teardown(void **state) static void test_audio_mixer_new(void **state) { - assert_non_null(mixer_dev_mock->private); + assert_non_null(mixer_dev_mock->priv_data); } static void test_audio_mixer_prepare_no_sources(void **state) diff --git a/test/cmocka/src/audio/mux/mux_get_processing_function.c b/test/cmocka/src/audio/mux/mux_get_processing_function.c index ba8aefb9f..1e8d1236d 100644 --- a/test/cmocka/src/audio/mux/mux_get_processing_function.c +++ b/test/cmocka/src/audio/mux/mux_get_processing_function.c @@ -49,7 +49,7 @@ static int setup_test_case(void **state) if (!td->dev) return -EINVAL; - td->cd = (struct comp_data *)td->dev->private; + td->cd = (struct comp_data *)td->dev->priv_data; *state = td;