diff options
author | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-05-24 23:18:48 +0000 |
---|---|---|
committer | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-05-24 23:18:48 +0000 |
commit | efcbab8676d19c3ad2b884c8249d3e40467d940c (patch) | |
tree | 4fda484ceb97ee2d25761247b4c23aa359cac932 | |
parent | 74ab674d435acdab3c4aa84f2cb2e4cd6b2d6f6b (diff) |
Move wdc_cd from ata/ata_wdc.c to ic/wdc.c so that you can compile a
kernel without the former. Also, eliminate two dead stores in
wdcattach().
ok dlg@
-rw-r--r-- | sys/dev/ata/ata_wdc.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/wdc.c | 10 |
2 files changed, 7 insertions, 9 deletions
diff --git a/sys/dev/ata/ata_wdc.c b/sys/dev/ata/ata_wdc.c index 41d9a21fddc..46e4305b0d8 100644 --- a/sys/dev/ata/ata_wdc.c +++ b/sys/dev/ata/ata_wdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ata_wdc.c,v 1.38 2011/04/18 04:16:13 deraadt Exp $ */ +/* $OpenBSD: ata_wdc.c,v 1.39 2011/05/24 23:18:47 matthew Exp $ */ /* $NetBSD: ata_wdc.c,v 1.21 1999/08/09 09:43:11 bouyer Exp $ */ /* @@ -98,10 +98,6 @@ int wdcdebug_wd_mask = WDCDEBUG_WD_MASK; #define ATA_DELAY 45000 /* 45s for a drive I/O */ -struct cfdriver wdc_cd = { - NULL, "wdc", DV_DULL -}; - void wdc_ata_bio_start(struct channel_softc *, struct wdc_xfer *); void _wdc_ata_bio_start(struct channel_softc *, struct wdc_xfer *); int wdc_ata_bio_intr(struct channel_softc *, struct wdc_xfer *, int); diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c index d7b1a22a6a9..288af34f0c8 100644 --- a/sys/dev/ic/wdc.c +++ b/sys/dev/ic/wdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdc.c,v 1.116 2011/05/09 22:33:54 matthew Exp $ */ +/* $OpenBSD: wdc.c,v 1.117 2011/05/24 23:18:47 matthew Exp $ */ /* $NetBSD: wdc.c,v 1.68 1999/06/23 19:00:17 bouyer Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -123,6 +123,10 @@ int wdc_floating_bus(struct channel_softc *, int); int wdc_preata_drive(struct channel_softc *, int); int wdc_ata_present(struct channel_softc *, int); +struct cfdriver wdc_cd = { + NULL, "wdc", DV_DULL +}; + struct channel_softc_vtbl wdc_default_vtbl = { wdc_default_read_reg, wdc_default_write_reg, @@ -727,7 +731,7 @@ wdc_free_queue(struct channel_queue *queue) void wdcattach(struct channel_softc *chp) { - int channel_flags, ctrl_flags, i; + int i; struct ata_atapi_attach aa_link; #ifdef WDCDEBUG int savedmask = wdcdebug_mask; @@ -809,8 +813,6 @@ wdcattach(struct channel_softc *chp) drvp->drive_flags &= ~DRIVE_OLD; } } - ctrl_flags = chp->wdc->sc_dev.dv_cfdata->cf_flags; - channel_flags = (ctrl_flags >> (NBBY * chp->channel)) & 0xff; WDCDEBUG_PRINT(("wdcattach: ch_drive_flags 0x%x 0x%x\n", chp->ch_drive[0].drive_flags, chp->ch_drive[1].drive_flags), |