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 <[email protected]>
---
 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 49d51a04b396..a497e17a0781 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 (#13254): 
https://lists.yoctoproject.org/g/linux-yocto/message/13254
Mute This Topic: https://lists.yoctoproject.org/mt/102335445/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to