summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2020-07-05 19:20:07 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2020-07-05 19:20:07 +0000
commit4e5d4d9686c4c21075d500fdbd7e3123c68992e7 (patch)
tree5d48eaad79e74fa4e13b3581a344e745f764007d /sys/arch
parent8bb8e4f9fc1910bcce02cd3b3df8f22ee4df5947 (diff)
Use scsi_link's 'bus' field rather than slightly more obscure
dev_parent twiddling. Improves chances of progress on eliminating various bus related fields from struct scsi_link. Tested by kmos@ "might actually be an improvement" kettenis@.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc64/sparc64/autoconf.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c
index 2ee25767870..17c2897d636 100644
--- a/sys/arch/sparc64/sparc64/autoconf.c
+++ b/sys/arch/sparc64/sparc64/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.135 2020/05/25 15:31:59 kettenis Exp $ */
+/* $OpenBSD: autoconf.c,v 1.136 2020/07/05 19:20:06 krw Exp $ */
/* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */
/*
@@ -1458,8 +1458,6 @@ device_register(struct device *dev, void *aux)
*/
struct scsi_attach_args *sa = aux;
struct scsi_link *sl = sa->sa_sc_link;
- struct scsibus_softc *sbsc =
- (struct scsibus_softc *)dev->dv_parent;
u_int target = bp->val[0];
u_int lun = bp->val[1];
@@ -1481,7 +1479,7 @@ device_register(struct device *dev, void *aux)
}
/* Check the controller that this scsibus is on. */
- if ((bp-1)->dev != sbsc->sc_dev.dv_parent)
+ if ((bp-1)->dev != sl->bus->sc_dev.dv_parent)
return;
/*