gpr.c patch

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

gpr.c patch

Markus Schatzl-3
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: