diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2020-02-12 14:08:57 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2020-02-12 14:08:57 +0000 |
commit | 758e0bf6ad9d426618ee8dc337d2e53666f59022 (patch) | |
tree | d26045b1a382c10440a3ba8a806d6348ddebfc22 /sys/dev/sdmmc | |
parent | 963f0b29ee8551233ffd0eb3c2b5f460d570e5ed (diff) |
Bring a few stragglers into line with the idiom used by the other 40+
scsi drivers. i.e. eliminate the struct scsi_adapter member in the
softc and rely on the pointer to a static scsi_adapter in the struct
scsi_link member.
Diffstat (limited to 'sys/dev/sdmmc')
-rw-r--r-- | sys/dev/sdmmc/sdmmc_scsi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/sdmmc/sdmmc_scsi.c b/sys/dev/sdmmc/sdmmc_scsi.c index 0ad8ec6ca08..702ae51cdae 100644 --- a/sys/dev/sdmmc/sdmmc_scsi.c +++ b/sys/dev/sdmmc/sdmmc_scsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdmmc_scsi.c,v 1.44 2020/01/26 00:53:31 krw Exp $ */ +/* $OpenBSD: sdmmc_scsi.c,v 1.45 2020/02/12 14:08:56 krw Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -68,7 +68,6 @@ struct sdmmc_ccb { TAILQ_HEAD(sdmmc_ccb_list, sdmmc_ccb); struct sdmmc_scsi_softc { - struct scsi_adapter sc_adapter; struct scsi_link sc_link; struct device *sc_child; struct sdmmc_scsi_target *sc_tgt; @@ -94,6 +93,10 @@ void sdmmc_done_xs(struct sdmmc_ccb *); void sdmmc_stimeout(void *); void sdmmc_minphys(struct buf *, struct scsi_link *); +struct scsi_adapter sdmmc_switch = { + sdmmc_scsi_cmd, sdmmc_minphys, NULL, NULL, NULL +}; + #ifdef SDMMC_DEBUG #define DPRINTF(s) printf s #else @@ -134,15 +137,12 @@ sdmmc_scsi_attach(struct sdmmc_softc *sc) sc->sc_scsibus = scbus; - scbus->sc_adapter.scsi_cmd = sdmmc_scsi_cmd; - scbus->sc_adapter.dev_minphys = sdmmc_minphys; - scbus->sc_link.adapter_target = SDMMC_SCSIID_HOST; scbus->sc_link.adapter_buswidth = scbus->sc_ntargets; scbus->sc_link.adapter_softc = sc; scbus->sc_link.luns = 1; scbus->sc_link.openings = 1; - scbus->sc_link.adapter = &scbus->sc_adapter; + scbus->sc_link.adapter = &sdmmc_switch; scbus->sc_link.pool = &scbus->sc_iopool; bzero(&saa, sizeof(saa)); |