Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev Use designated initializers for struct ata_bustype



details:   https://anonhg.NetBSD.org/src/rev/e7163370b28d
branches:  trunk
changeset: 979343:e7163370b28d
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Dec 25 08:55:40 2020 +0000

description:
Use designated initializers for struct ata_bustype

diffstat:

 sys/dev/ata/ata_wdc.c      |  24 ++++++++++++------------
 sys/dev/ic/ahcisata_core.c |  24 ++++++++++++------------
 2 files changed, 24 insertions(+), 24 deletions(-)

diffs (90 lines):

diff -r 3fcee55c9b2e -r e7163370b28d sys/dev/ata/ata_wdc.c
--- a/sys/dev/ata/ata_wdc.c     Fri Dec 25 07:00:52 2020 +0000
+++ b/sys/dev/ata/ata_wdc.c     Fri Dec 25 08:55:40 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ata_wdc.c,v 1.118 2020/05/21 09:11:33 jdolecek Exp $   */
+/*     $NetBSD: ata_wdc.c,v 1.119 2020/12/25 08:55:40 skrll Exp $      */
 
 /*
  * Copyright (c) 1998, 2001, 2003 Manuel Bouyer.
@@ -54,7 +54,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.118 2020/05/21 09:11:33 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.119 2020/12/25 08:55:40 skrll Exp $");
 
 #include "opt_ata.h"
 #include "opt_wdc.h"
@@ -119,16 +119,16 @@
 static void    wdc_ata_delref(struct ata_drive_datas *);
 
 const struct ata_bustype wdc_ata_bustype = {
-       SCSIPI_BUSTYPE_ATA,
-       wdc_ata_bio,
-       wdc_reset_drive,
-       wdc_reset_channel,
-       wdc_exec_command,
-       ata_get_params,
-       wdc_ata_addref,
-       wdc_ata_delref,
-       ata_kill_pending,
-       NULL,
+       .bustype_type = SCSIPI_BUSTYPE_ATA,
+       .ata_bio = wdc_ata_bio,
+       .ata_reset_drive = wdc_reset_drive,
+       .ata_reset_channel = wdc_reset_channel,
+       .ata_exec_command = wdc_exec_command,
+       .ata_get_params = ata_get_params,
+       .ata_addref = wdc_ata_addref,
+       .ata_delref = wdc_ata_delref,
+       .ata_killpending = ata_kill_pending,
+       .ata_recovery = NULL,
 };
 
 static const struct ata_xfer_ops wdc_bio_xfer_ops = {
diff -r 3fcee55c9b2e -r e7163370b28d sys/dev/ic/ahcisata_core.c
--- a/sys/dev/ic/ahcisata_core.c        Fri Dec 25 07:00:52 2020 +0000
+++ b/sys/dev/ic/ahcisata_core.c        Fri Dec 25 08:55:40 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ahcisata_core.c,v 1.85 2020/12/20 00:14:30 jmcneill Exp $      */
+/*     $NetBSD: ahcisata_core.c,v 1.86 2020/12/25 08:55:40 skrll Exp $ */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.85 2020/12/20 00:14:30 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.86 2020/12/25 08:55:40 skrll Exp $");
 
 #include <sys/types.h>
 #include <sys/malloc.h>
@@ -113,16 +113,16 @@
 #define AHCI_RST_WAIT (ATA_RESET_DELAY / 10)
 
 const struct ata_bustype ahci_ata_bustype = {
-       SCSIPI_BUSTYPE_ATA,
-       ahci_ata_bio,
-       ahci_reset_drive,
-       ahci_reset_channel,
-       ahci_exec_command,
-       ata_get_params,
-       ahci_ata_addref,
-       ahci_ata_delref,
-       ahci_killpending,
-       ahci_channel_recover,
+       .bustype_type = SCSIPI_BUSTYPE_ATA,
+       .ata_bio = ahci_ata_bio,
+       .ata_reset_drive = ahci_reset_drive,
+       .ata_reset_channel = ahci_reset_channel,
+       .ata_exec_command = ahci_exec_command,
+       .ata_get_params = ata_get_params,
+       .ata_addref = ahci_ata_addref,
+       .ata_delref = ahci_ata_delref,
+       .ata_killpending = ahci_killpending,
+       .ata_recovery = ahci_channel_recover,
 };
 
 static void ahci_setup_port(struct ahci_softc *sc, int i);



Home | Main Index | Thread Index | Old Index