[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gpr.c patch
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: gpr.c patch
- From: Markus Schatzl <wtf_(_at_)_neuronenwerk_(_dot_)_de>
- Date: Wed, 29 Mar 2006 11:06:03 +0200
Hi,
I happen to be involved in some SmartCard development recently,
and try to make things also work on OpenBSD. I recognized that
the kernel doesn't compile with
gpr* at pcmcia?
because of a typo and a goto-label that is never referenced.
This yields a compile warnig, whicht breaks the build:
/usr/src/sys/dev/pcmcia/gpr.c: In function `gpr_attach':
/usr/src/sys/dev/pcmcia/gpr.c:212: warning: label `fail_intr' defined but not used
*** Error code 1
Stop in /usr/src/sys/arch/i386/compile/GENERIC (line 3435 of
Makefile).
Attached you find a diff that remedies the problem for me (and
most probably everybody else).
All the best,
/Markus
--- gpr.c.orig Wed Mar 29 10:36:48 2006
+++ gpr.c Wed Mar 29 10:59:09 2006
@@ -204,13 +204,11 @@
sc->sc_ih = pcmcia_intr_establish(pa->pf, IPL_TTY, gpr_intr, sc,
sc->sc_dev.dv_xname);
- intrstr = pcmcia_intr_string(psc->sc_pf, sc->sc_ih);
+ intrstr = pcmcia_intr_string(sc->sc_pf, sc->sc_ih);
printf("%s%s\n", *intrstr ? ", " : "", intrstr);
if (sc->sc_ih != NULL)
return;
-fail_intr:
- pcmcia_mem_unmap(pa->pf, sc->sc_memwin);
fail_mem_map:
pcmcia_mem_free(pa->pf, &sc->sc_pmemh);
fail_mem_alloc:
Visit your host, monkey.org