diff options
author | marius <marius@FreeBSD.org> | 2008-10-14 20:18:57 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2008-10-14 20:18:57 +0000 |
commit | 660ef1bcc42db77da56807b150a4a60a32f75d6d (patch) | |
tree | 48e1a984fd5a065cc5364ab951384d62fbc9b4eb /sys/dev/sym/sym_hipd.c | |
parent | 86cb0462ed491b3bc7a7acb598e3e67a6a546a7d (diff) | |
download | FreeBSD-src-660ef1bcc42db77da56807b150a4a60a32f75d6d.zip FreeBSD-src-660ef1bcc42db77da56807b150a4a60a32f75d6d.tar.gz |
Use xpt_register_async() in order to remove code duplication.
MFC after: 1 month
Diffstat (limited to 'sys/dev/sym/sym_hipd.c')
-rw-r--r-- | sys/dev/sym/sym_hipd.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c index aa217c9..ab74a55 100644 --- a/sys/dev/sym/sym_hipd.c +++ b/sys/dev/sym/sym_hipd.c @@ -8974,7 +8974,6 @@ static int sym_cam_attach(hcb_p np) struct cam_devq *devq = NULL; struct cam_sim *sim = NULL; struct cam_path *path = NULL; - struct ccb_setasync csa; int err; /* @@ -9021,12 +9020,9 @@ static int sym_cam_attach(hcb_p np) /* * Establish our async notification handler. */ - xpt_setup_ccb(&csa.ccb_h, np->path, 5); - csa.ccb_h.func_code = XPT_SASYNC_CB; - csa.event_enable = AC_LOST_DEVICE; - csa.callback = sym_async; - csa.callback_arg = np->sim; - xpt_action((union ccb *)&csa); + if (xpt_register_async(AC_LOST_DEVICE, sym_async, sim, path) != + CAM_REQ_CMP) + goto fail; /* * Start the chip now, without resetting the BUS, since |