=================================================================== RCS file: /cvs/funnyos/arch/testarm/dev/tacons.c,v retrieving revision 1.3 retrieving revision 1.5 diff -u -r1.3 -r1.5 --- funnyos/arch/testarm/dev/tacons.c 2007/10/16 21:35:30 1.3 +++ funnyos/arch/testarm/dev/tacons.c 2007/10/16 22:34:49 1.5 @@ -1,11 +1,12 @@ /* - * $Id: tacons.c,v 1.3 2007/10/16 20:35:30 init Exp $ + * $Id: tacons.c,v 1.5 2007/10/16 21:34:49 init Exp $ */ #include #include #include #include +#include #include #include @@ -29,7 +30,7 @@ tacons_attach(struct device *self, uint32_t loc, uint8_t flags) { struct tacons_dd *ddp = self->dv_devdata; - struct fcons_handle *fhp = &ddp->td_consops; + struct fcons_handle *fhp = &ddp->td_fh; /* aquire bus handle from parent */ ddp->td_bhp = self->dv_parent->dv_aux; @@ -41,6 +42,9 @@ fhp->getc = tacons_getc; fhp->putc = tacons_putc; + /* give our dd to fcons_handle */ + fhp->fh_ownerdd = ddp; + self->dv_aux = fhp; printf("testarm simple console (non-blocking, halt)\n"); @@ -70,7 +74,7 @@ */ struct tacons_dd *tdp = ddp; - return( bus_write_1(tdp->td_dhp, tdp->td_ioaddr, ch) ); + bus_write_1(tdp->td_bhp, tdp->td_ioaddr, ch); }