summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornate <nate@FreeBSD.org>1996-06-05 05:30:09 +0000
committernate <nate@FreeBSD.org>1996-06-05 05:30:09 +0000
commitd197dcd271d442bc58e2ff1ae5fab02eb8f77e85 (patch)
tree7507726b154d12289a133f445dd19beab88e870f
parent705e40a87b7a38681e16a0b6f29b68cbd340f847 (diff)
downloadFreeBSD-src-d197dcd271d442bc58e2ff1ae5fab02eb8f77e85.zip
FreeBSD-src-d197dcd271d442bc58e2ff1ae5fab02eb8f77e85.tar.gz
Minor formatting changes. No functional differences, but makes the
style more consistant with KNF and the Nomad release.
-rw-r--r--sys/pccard/cis.h1
-rw-r--r--sys/pccard/pccard.c32
2 files changed, 15 insertions, 18 deletions
diff --git a/sys/pccard/cis.h b/sys/pccard/cis.h
index 99c13af..9dde483 100644
--- a/sys/pccard/cis.h
+++ b/sys/pccard/cis.h
@@ -1,4 +1,3 @@
-
/*
* PCMCIA card structures and defines.
* These defines relate to the user level
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c
index 3e3440a..3f223a8 100644
--- a/sys/pccard/pccard.c
+++ b/sys/pccard/pccard.c
@@ -47,9 +47,6 @@
#include <sys/devfsext.h>
#endif /*DEVFS*/
-#include <machine/clock.h>
-#include <machine/laptops.h>
-
#include <i386/isa/isa.h>
#include <i386/isa/isa_device.h>
#include <i386/isa/icu.h>
@@ -63,6 +60,9 @@
#include <pccard/driver.h>
#include <pccard/slot.h>
+#include <machine/clock.h>
+#include <machine/laptops.h>
+
extern struct kern_devconf kdc_cpu0;
struct kern_devconf kdc_pccard0 = {
@@ -321,8 +321,8 @@ disable_slot(struct slot *sp)
splx(s);
}
}
- /* Power off the slot. */
- timeout(power_off_slot, (caddr_t)sp, hz / 4);
+ /* Power off the slot 1/2 second after remove of the card */
+ timeout(power_off_slot, (caddr_t)sp, hz / 2);
sp->pwr_off_pending = 1;
/* De-activate all contexts. */
@@ -366,7 +366,7 @@ slot_resume(void *arg)
if (sp->irq)
sp->ctrl->mapirq(sp, sp->irq);
for (dp = sp->devices; dp; dp = dp->next)
- (void) dp->drv->init(dp, 0);
+ (void) dp->drv->init(dp, 0);
return (0);
}
#endif /* NAPM > 0 */
@@ -654,7 +654,7 @@ static void enable_beep(void *dummy)
void
pccard_event(struct slot *sp, enum card_event event)
{
-int s;
+ int s;
if (sp->insert_seq) {
sp->insert_seq = 0;
@@ -672,10 +672,9 @@ int s;
sp->state = empty;
splx(s);
printf("Card removed, slot %d\n", sp->slot);
- if (beepok) {
+ if (beepok)
sysbeep(PCCARD_BEEP_PITCH0, PCCARD_BEEP_DURATION0);
- beepok = 0;
- }
+ beepok = 0;
timeout(enable_beep, (void *)NULL, hz/5);
selwakeup(&sp->selp);
}
@@ -683,10 +682,9 @@ int s;
case card_inserted:
sp->insert_seq = 1;
timeout(inserted, (void *)sp, hz/4);
- if (beepok) {
+ if (beepok)
sysbeep(PCCARD_BEEP_PITCH0, PCCARD_BEEP_DURATION0);
- beepok = 0;
- }
+ beepok = 0;
timeout(enable_beep, (void *)NULL, hz/5);
break;
}
@@ -712,13 +710,13 @@ slot_irq_handler(int sp)
((struct slot *)sp)->slot, ((struct slot *)sp)->irq);
}
- /*
- * Device driver interface.
- */
+/*
+ * Device driver interface.
+ */
static int
crdopen(dev_t dev, int oflags, int devtype, struct proc *p)
{
-struct slot *sp;
+ struct slot *sp;
if (minor(dev) >= MAXSLOT)
return(ENXIO);
OpenPOWER on IntegriCloud