Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic fix a device/softc error.
details: https://anonhg.NetBSD.org/src/rev/14fa032e0456
branches: trunk
changeset: 330428:14fa032e0456
user: chs <chs%NetBSD.org@localhost>
date: Tue Jul 08 14:18:54 2014 +0000
description:
fix a device/softc error.
remove some related glue that is no longer needed.
diffstat:
sys/dev/ic/mpt_netbsd.c | 15 ++++-----------
1 files changed, 4 insertions(+), 11 deletions(-)
diffs (50 lines):
diff -r 09395d3011e6 -r 14fa032e0456 sys/dev/ic/mpt_netbsd.c
--- a/sys/dev/ic/mpt_netbsd.c Tue Jul 08 14:06:17 2014 +0000
+++ b/sys/dev/ic/mpt_netbsd.c Tue Jul 08 14:18:54 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mpt_netbsd.c,v 1.24 2014/04/17 16:08:42 christos Exp $ */
+/* $NetBSD: mpt_netbsd.c,v 1.25 2014/07/08 14:18:54 chs Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.24 2014/04/17 16:08:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.25 2014/07/08 14:18:54 chs Exp $");
#include <dev/ic/mpt.h> /* pulls in all headers */
#include <sys/scsiio.h>
@@ -100,13 +100,6 @@
static int mpt_ioctl(struct scsipi_channel *, u_long, void *, int,
struct proc *);
-/*
- * XXX - this assumes the device_private() of the attachement starts with
- * a struct mpt_softc, so we can use the return value of device_private()
- * straight without any offset.
- */
-#define DEV_TO_MPT(DEV) device_private(DEV)
-
void
mpt_scsipi_attach(mpt_softc_t *mpt)
{
@@ -367,7 +360,7 @@
}
xs = req->xfer;
periph = xs->xs_periph;
- mpt = (void *) periph->periph_channel->chan_adapter->adapt_dev;
+ mpt = device_private(periph->periph_channel->chan_adapter->adapt_dev);
scsipi_printaddr(periph);
printf("command timeout\n");
@@ -1541,7 +1534,7 @@
void *arg)
{
struct scsipi_adapter *adapt = chan->chan_adapter;
- mpt_softc_t *mpt = DEV_TO_MPT(adapt->adapt_dev);
+ mpt_softc_t *mpt = device_private(adapt->adapt_dev);
switch (req) {
case ADAPTER_REQ_RUN_XFER:
Home |
Main Index |
Thread Index |
Old Index