summaryrefslogtreecommitdiff
path: root/sys/scsi/cd.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2020-06-30 18:43:38 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2020-06-30 18:43:38 +0000
commitda2bf588cc79557a2727bd2bb101c2db4862d39c (patch)
tree8a1427333e995d6dfca77d233bffa9ac941ff180 /sys/scsi/cd.c
parenta7626b42c189c2b699b550092b7b6e4a48581367 (diff)
Nuke unneeded 'sa_inqbuf' member of struct scsi_attach_args. It always
points to the inquiry data contained in the struct scsi_link pointed to by the other member, sa_sc_link.
Diffstat (limited to 'sys/scsi/cd.c')
-rw-r--r--sys/scsi/cd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index 4dbe81ef6c9..d3b5b33775e 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd.c,v 1.245 2020/02/20 16:26:01 krw Exp $ */
+/* $OpenBSD: cd.c,v 1.246 2020/06/30 18:43:36 krw Exp $ */
/* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */
/*
@@ -177,9 +177,10 @@ int
cdmatch(struct device *parent, void *match, void *aux)
{
struct scsi_attach_args *sa = aux;
+ struct scsi_inquiry_data *inq = &sa->sa_sc_link->inqdata;
int priority;
- scsi_inqmatch(sa->sa_inqbuf, cd_patterns, nitems(cd_patterns),
+ scsi_inqmatch(inq, cd_patterns, nitems(cd_patterns),
sizeof(cd_patterns[0]), &priority);
return priority;
@@ -217,7 +218,7 @@ cdattach(struct device *parent, struct device *self, void *aux)
* Note if this device is ancient. This is used in cdminphys().
*/
if (!ISSET(link->flags, SDEV_ATAPI) &&
- SID_ANSII_REV(sa->sa_inqbuf) == SCSI_REV_0)
+ SID_ANSII_REV(&link->inqdata) == SCSI_REV_0)
SET(sc->sc_flags, CDF_ANCIENT);
printf("\n");