|
|
| version 1.7, 2004/05/13 23:49:22 | version 1.8, 2004/05/19 22:52:53 |
|---|---|
| Line 182 static int | Line 182 static int |
| ctxprobe(struct isa_device * devp) | ctxprobe(struct isa_device * devp) |
| { | { |
| int status; | int status; |
| static int once; | |
| if (!once++) | |
| cdevsw_add(&ctx_cdevsw); | |
| if (inb(devp->id_iobase) == 0xff) /* 0xff only if board absent */ | if (inb(devp->id_iobase) == 0xff) /* 0xff only if board absent */ |
| status = 0; | status = 0; |
| else { | else |
| status = 1; /*XXX uses only one port? */ | status = 1; /*XXX uses only one port? */ |
| } | |
| return (status); | return (status); |
| } | } |
| Line 206 ctxattach(struct isa_device * devp) | Line 202 ctxattach(struct isa_device * devp) |
| sr->iobase = devp->id_iobase; | sr->iobase = devp->id_iobase; |
| sr->maddr = devp->id_maddr; | sr->maddr = devp->id_maddr; |
| sr->msize = devp->id_msize; | sr->msize = devp->id_msize; |
| make_dev(&ctx_cdevsw, 0, 0, 0, 0600, "ctx%d", devp->id_unit); | cdevsw_add(&ctx_cdevsw, -1, devp->id_unit); |
| make_dev(&ctx_cdevsw, devp->id_unit, 0, 0, 0600, | |
| "ctx%d", devp->id_unit); | |
| return (1); | return (1); |
| } | } |