diff options
author | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-05-08 19:46:11 +0000 |
---|---|---|
committer | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-05-08 19:46:11 +0000 |
commit | ccf47d1672cad6888d700a022f431f1ee8d54a95 (patch) | |
tree | 01d3abc033dc5b163bdce5aca3909c0e467c0dd4 /sys/dev/ata/atascsi.c | |
parent | ddd48b5f2421f22f246e7121fe87c61b69fc3582 (diff) |
Move ata_put_xfer() from ata_xfer to atascsi_methods. It's just silly
to have a non-changing function pointer be part of an object rather
than it's virtual method table.
ok dlg@; tested on ahci(4) by Mattieu Baptiste, jasper@, and Jason
Crawford; no sili(4) testers, but identical changes to ahci(4)
Diffstat (limited to 'sys/dev/ata/atascsi.c')
-rw-r--r-- | sys/dev/ata/atascsi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c index 5f142a83892..bce24831d18 100644 --- a/sys/dev/ata/atascsi.c +++ b/sys/dev/ata/atascsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.c,v 1.104 2011/05/05 19:23:05 matthew Exp $ */ +/* $OpenBSD: atascsi.c,v 1.105 2011/05/08 19:46:10 matthew Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -1590,10 +1590,12 @@ atascsi_io_get(void *cookie) void atascsi_io_put(void *cookie, void *io) { - struct ata_xfer *xa = io; + struct atascsi_host_port *ahp = cookie; + struct atascsi *as = ahp->ahp_as; + struct ata_xfer *xa = io; xa->state = ATA_S_COMPLETE; /* XXX this state machine is dumb */ - xa->ata_put_xfer(xa); + as->as_methods->ata_put_xfer(xa); } void |