For clarity of scsidevdetached(), rename some variables: sc ->
self, dev -> child, ssc -> sc.
This commit is contained in:
parent
082ca23a21
commit
c23dc9c098
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: scsiconf.c,v 1.255 2009/11/12 19:44:17 dyoung Exp $ */
|
||||
/* $NetBSD: scsiconf.c,v 1.256 2010/04/27 18:55:12 dyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
|
||||
|
@ -48,7 +48,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.255 2009/11/12 19:44:17 dyoung Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.256 2010/04/27 18:55:12 dyoung Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -353,18 +353,18 @@ scsibusrescan(device_t sc, const char *ifattr,
|
|||
}
|
||||
|
||||
static void
|
||||
scsidevdetached(device_t sc, device_t dev)
|
||||
scsidevdetached(device_t self, device_t child)
|
||||
{
|
||||
struct scsibus_softc *ssc = device_private(sc);
|
||||
struct scsipi_channel *chan = ssc->sc_channel;
|
||||
struct scsibus_softc *sc = device_private(self);
|
||||
struct scsipi_channel *chan = sc->sc_channel;
|
||||
struct scsipi_periph *periph;
|
||||
int target, lun;
|
||||
|
||||
target = device_locator(dev, SCSIBUSCF_TARGET);
|
||||
lun = device_locator(dev, SCSIBUSCF_LUN);
|
||||
target = device_locator(child, SCSIBUSCF_TARGET);
|
||||
lun = device_locator(child, SCSIBUSCF_LUN);
|
||||
|
||||
periph = scsipi_lookup_periph(chan, target, lun);
|
||||
KASSERT(periph->periph_dev == dev);
|
||||
KASSERT(periph->periph_dev == child);
|
||||
|
||||
scsipi_remove_periph(chan, periph);
|
||||
free(periph, M_DEVBUF);
|
||||
|
|
Loading…
Reference in New Issue