summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-07-27 05:55:04 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-07-27 05:55:04 +0000
commit34aa0a61adcf1ff6404e30f1f422ba690b2c0a29 (patch)
tree2a6dc41bd48f6e6e41debddda9d6e65ea41ceb05 /sys/dev/pci
parent463022a1f7e1d150df7527f395eb87e9c2dbc54a (diff)
Rework opl_find() so that it does not need to take a proto softc, shaves
more than 2.5KB of stack for its callers (and even more on 64 bit arches).
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/opl_cmpci.c14
-rw-r--r--sys/dev/pci/opl_yds.c12
2 files changed, 13 insertions, 13 deletions
diff --git a/sys/dev/pci/opl_cmpci.c b/sys/dev/pci/opl_cmpci.c
index ae867ede6d0..f58b303eed3 100644
--- a/sys/dev/pci/opl_cmpci.c
+++ b/sys/dev/pci/opl_cmpci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: opl_cmpci.c,v 1.1 2006/07/27 00:45:59 brad Exp $ */
+/* $OpenBSD: opl_cmpci.c,v 1.2 2006/07/27 05:55:03 miod Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -77,15 +77,15 @@ opl_cmpci_match(struct device *parent, void *match, void *aux)
{
struct audio_attach_args *aa = (struct audio_attach_args *)aux;
struct cmpci_softc *ssc = (struct cmpci_softc *)parent;
- struct opl_softc sc;
+ struct opl_attach_args oaa;
if (aa->type != AUDIODEV_TYPE_OPL)
return (0);
- memset(&sc, 0, sizeof sc);
- sc.iot = ssc->sc_iot;
- sc.ioh = ssc->sc_ioh;
- sc.offs = CMPCI_REG_FM_BASE;
- return (opl_find(&sc));
+ memset(&oaa, 0, sizeof oaa);
+ oaa.iot = ssc->sc_iot;
+ oaa.ioh = ssc->sc_ioh;
+ oaa.offs = CMPCI_REG_FM_BASE;
+ return (opl_find(&oaa));
}
void
diff --git a/sys/dev/pci/opl_yds.c b/sys/dev/pci/opl_yds.c
index 4f378779d7a..0e0fa685b93 100644
--- a/sys/dev/pci/opl_yds.c
+++ b/sys/dev/pci/opl_yds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: opl_yds.c,v 1.5 2005/11/21 18:16:41 millert Exp $ */
+/* $OpenBSD: opl_yds.c,v 1.6 2006/07/27 05:55:03 miod Exp $ */
/* $NetBSD$ */
/*
@@ -82,14 +82,14 @@ opl_yds_match(parent, match, aux)
{
struct audio_attach_args *aa = (struct audio_attach_args *)aux;
struct yds_softc *ssc = (struct yds_softc *)parent;
- struct opl_softc sc;
+ struct opl_attach_arg oaa;
if (aa->type != AUDIODEV_TYPE_OPL)
return (0);
- memset(&sc, 0, sizeof sc);
- sc.iot = ssc->sc_opl_iot;
- sc.ioh = ssc->sc_opl_ioh;
- return (opl_find(&sc));
+ memset(&oaa, 0, sizeof oaa);
+ oaa.iot = ssc->sc_opl_iot;
+ oaa.ioh = ssc->sc_opl_ioh;
+ return (opl_find(&oaa));
}
void