Module Name:    src
Committed By:   skrll
Date:           Fri Dec 25 08:55:40 UTC 2020

Modified Files:
        src/sys/dev/ata: ata_wdc.c
        src/sys/dev/ic: ahcisata_core.c

Log Message:
Use designated initializers for struct ata_bustype


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/dev/ata/ata_wdc.c
cvs rdiff -u -r1.85 -r1.86 src/sys/dev/ic/ahcisata_core.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ata/ata_wdc.c
diff -u src/sys/dev/ata/ata_wdc.c:1.118 src/sys/dev/ata/ata_wdc.c:1.119
--- src/sys/dev/ata/ata_wdc.c:1.118	Thu May 21 09:11:33 2020
+++ src/sys/dev/ata/ata_wdc.c	Fri Dec 25 08:55:40 2020
@@ -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 int	wdc_ata_addref(struct ata_dri
 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 = {

Index: src/sys/dev/ic/ahcisata_core.c
diff -u src/sys/dev/ic/ahcisata_core.c:1.85 src/sys/dev/ic/ahcisata_core.c:1.86
--- src/sys/dev/ic/ahcisata_core.c:1.85	Sun Dec 20 00:14:30 2020
+++ src/sys/dev/ic/ahcisata_core.c	Fri Dec 25 08:55:40 2020
@@ -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 @@ static const struct scsipi_bustype ahci_
 #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);

Reply via email to