summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2014-03-30 01:17:51 +0000
committerchristos <christos@NetBSD.org>2014-03-30 01:17:51 +0000
commit7f369b01d7eb360e2d7938426c0bbd45ee7f356f (patch)
tree3e111b7d0dc7cba6884eec187de5d87454272c38 /sys/dev
parenta58bd13660651f4f7d7a28ccb9550c027c191530 (diff)
catch up with pci_intr_string changes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/marvell/mvpex.c13
-rw-r--r--sys/dev/marvell/mvpexvar.h4
2 files changed, 7 insertions, 10 deletions
diff --git a/sys/dev/marvell/mvpex.c b/sys/dev/marvell/mvpex.c
index d76abeab92d..90e563ab801 100644
--- a/sys/dev/marvell/mvpex.c
+++ b/sys/dev/marvell/mvpex.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mvpex.c,v 1.9 2014/03/15 13:33:48 kiyohara Exp $ */
+/* $NetBSD: mvpex.c,v 1.10 2014/03/30 01:17:51 christos Exp $ */
/*
* Copyright (c) 2008 KIYOHARA Takashi
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mvpex.c,v 1.9 2014/03/15 13:33:48 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvpex.c,v 1.10 2014/03/30 01:17:51 christos Exp $");
#include "opt_pci.h"
#include "pci.h"
@@ -620,10 +620,8 @@ mvpex_intr_map(const struct pci_attach_args *pa, pci_intr_handle_t *ihp)
/* ARGSUSED */
const char *
-mvpex_intr_string(void *v, pci_intr_handle_t pin)
+mvpex_intr_string(void *v, pci_intr_handle_t pin, char *buf size_t len)
{
- static char intrstr[32];
-
switch (pin) {
case PCI_INTERRUPT_PIN_A:
case PCI_INTERRUPT_PIN_B:
@@ -634,10 +632,9 @@ mvpex_intr_string(void *v, pci_intr_handle_t pin)
default:
return NULL;
}
- snprintf(intrstr, sizeof(intrstr), "interrupt pin INT%c#",
- (char)('A' - 1 + pin));
+ snprintf(buf, len, "interrupt pin INT%c#", (char)('A' - 1 + pin));
- return intrstr;
+ return buf;
}
/* ARGSUSED */
diff --git a/sys/dev/marvell/mvpexvar.h b/sys/dev/marvell/mvpexvar.h
index 25b3909d20b..051ee4c43d1 100644
--- a/sys/dev/marvell/mvpexvar.h
+++ b/sys/dev/marvell/mvpexvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: mvpexvar.h,v 1.4 2014/03/15 13:33:48 kiyohara Exp $ */
+/* $NetBSD: mvpexvar.h,v 1.5 2014/03/30 01:17:51 christos Exp $ */
/*
* Copyright (c) 2009 KIYOHARA Takashi
* All rights reserved.
@@ -70,7 +70,7 @@ void mvpex_conf_write(void *, pcitag_t, int, pcireg_t);
int mvpex_conf_hook(void *, int, int, int, pcireg_t);
void mvpex_conf_interrupt(void *, int, int, int, int, int *);
int mvpex_intr_map(const struct pci_attach_args *, pci_intr_handle_t *);
-const char *mvpex_intr_string(void *, pci_intr_handle_t);
+const char *mvpex_intr_string(void *, pci_intr_handle_t, char *, size_t);
const struct evcnt *mvpex_intr_evcnt(void *, pci_intr_handle_t);
void *mvpex_intr_establish(void *, pci_intr_handle_t, int, int (*)(void *),
void *);