Commit ae3c253
media: platform: mtk-mdp3: work around unused-variable warning
When CONFIG_OF is disabled, the 'data' variable is not used at all
because of_match_node() turns into a dummy macro:
drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c: In function 'mdp_comp_sub_create':
drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c:1038:36: error: unused variable 'data' [-Werror=unused-variable]
1038 | const struct mtk_mdp_driver_data *data = mdp->mdp_data;
| ^~~~
Remove the variable again by moving the pointer dereference into the
of_match_node call.
Fixes: b385b99 ("media: platform: mtk-mdp3: chip config split about subcomponents")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>1 parent 55e2a6e commit ae3c253
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1035 | 1035 | | |
1036 | 1036 | | |
1037 | 1037 | | |
1038 | | - | |
1039 | 1038 | | |
1040 | 1039 | | |
1041 | 1040 | | |
| |||
1045 | 1044 | | |
1046 | 1045 | | |
1047 | 1046 | | |
1048 | | - | |
| 1047 | + | |
1049 | 1048 | | |
1050 | 1049 | | |
1051 | 1050 | | |
| |||
0 commit comments