When kernel builds with -Werror=designated-init, there will be an error as below, include the field names in the struct when init it to fix the error.
drivers/misc/axxia-ncr.c:202:9: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] Signed-off-by: Liwei Song <liwei.s...@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfi...@gmail.com> --- drivers/misc/axxia-ncr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/misc/axxia-ncr.c b/drivers/misc/axxia-ncr.c index e9b61bc7f967..73fa2671d7d8 100644 --- a/drivers/misc/axxia-ncr.c +++ b/drivers/misc/axxia-ncr.c @@ -199,13 +199,13 @@ struct ncr_io_fns { }; struct ncr_io_fns ncr_io_fn_lock = { - ncr_register_read_lock, - ncr_register_write_lock + .rd = ncr_register_read_lock, + .wr = ncr_register_write_lock, }; struct ncr_io_fns ncr_io_fn_nolock = { - ncr_register_read, - ncr_register_write + .rd = ncr_register_read, + .wr = ncr_register_write, }; struct ncr_io_fns *default_io_fn; -- 2.40.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#14096): https://lists.yoctoproject.org/g/linux-yocto/message/14096 Mute This Topic: https://lists.yoctoproject.org/mt/106846618/21656 Group Owner: linux-yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-