handle lack of locators in LKM context differently.
This commit is contained in:
parent
8a9023bfc6
commit
630333b875
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: iwm_fd.c,v 1.31 2005/01/15 16:01:00 chs Exp $ */
|
/* $NetBSD: iwm_fd.c,v 1.32 2005/01/16 00:32:03 chs Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 1998 Hauke Fath. All rights reserved.
|
* Copyright (c) 1997, 1998 Hauke Fath. All rights reserved.
|
||||||
|
@ -34,9 +34,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: iwm_fd.c,v 1.31 2005/01/15 16:01:00 chs Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: iwm_fd.c,v 1.32 2005/01/16 00:32:03 chs Exp $");
|
||||||
|
|
||||||
#ifndef _LKM
|
#ifdef _LKM
|
||||||
|
#define IWMCF_DRIVE 0
|
||||||
|
#else
|
||||||
#include "locators.h"
|
#include "locators.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -420,11 +422,7 @@ fd_match(struct device *parent, struct cfdata *match, void *auxp)
|
||||||
|
|
||||||
cfp = match;
|
cfp = match;
|
||||||
fdParams = (iwmAttachArgs_t *)auxp;
|
fdParams = (iwmAttachArgs_t *)auxp;
|
||||||
#ifdef _LKM
|
|
||||||
cfUnit = cfp->cf_loc[0];
|
|
||||||
#else
|
|
||||||
cfUnit = cfp->cf_loc[IWMCF_DRIVE];
|
cfUnit = cfp->cf_loc[IWMCF_DRIVE];
|
||||||
#endif
|
|
||||||
matched = (cfUnit == fdParams->unit || cfUnit == -1) ? 1 : 0;
|
matched = (cfUnit == fdParams->unit || cfUnit == -1) ? 1 : 0;
|
||||||
if (TRACE_CONFIG) {
|
if (TRACE_CONFIG) {
|
||||||
printf("fdMatch() drive %d ? cfUnit = %d\n",
|
printf("fdMatch() drive %d ? cfUnit = %d\n",
|
||||||
|
|
Loading…
Reference in New Issue