summaryrefslogtreecommitdiffstats
path: root/sys/pccard/pccard.c
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2001-03-20 18:10:19 +0000
committeriedowse <iedowse@FreeBSD.org>2001-03-20 18:10:19 +0000
commitebd6ae3e698b396be69e6680b62601a931178567 (patch)
treecf44e68ecc439a1c440acdcb28ffdc027c2ca153 /sys/pccard/pccard.c
parenta23a98f93775337b71a7091ec9f7ca246cb401fe (diff)
downloadFreeBSD-src-ebd6ae3e698b396be69e6680b62601a931178567.zip
FreeBSD-src-ebd6ae3e698b396be69e6680b62601a931178567.tar.gz
Place the call to pccard_insert_beep() in the inserted() timeout
routine instead of pccard_event(). This avoids spurious extra calls to pccard_insert_beep() at insert or remove time which could occur due to noise on the card-present lines. Clean up some code in pccard_beep.c; we were depending on the order of evaluation of function arguments, which is undefined in C. Also, use `0' rather than `NULL' for integer values. Reviewed by: sanpei, imp
Diffstat (limited to 'sys/pccard/pccard.c')
-rw-r--r--sys/pccard/pccard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c
index 62f0f73..98a820e 100644
--- a/sys/pccard/pccard.c
+++ b/sys/pccard/pccard.c
@@ -293,6 +293,7 @@ inserted(void *arg)
slt->ctrl->power(slt);
printf("pccard: card inserted, slot %d\n", slt->slotnum);
+ pccard_insert_beep();
/*
* Now start resetting the card.
*/
@@ -325,7 +326,6 @@ pccard_event(struct slot *slt, enum card_event event)
case card_inserted:
slt->insert_seq = 1;
slt->insert_ch = timeout(inserted, (void *)slt, hz/4);
- pccard_insert_beep();
break;
}
}
OpenPOWER on IntegriCloud