summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorplunky <plunky@NetBSD.org>2012-04-06 20:33:20 +0000
committerplunky <plunky@NetBSD.org>2012-04-06 20:33:20 +0000
commit6a7de2be4ddfd1304937f4827e0efba3eb19d40d (patch)
tree9b4a79a724ccc5d0ce39fdd61371cd7c04332c9a
parent8b2e8e843c69a3fb3842794854af2f4b1ca5cfa5 (diff)
device_pmf_is_registered() is not required
-rw-r--r--sys/arch/x86/pci/pcib.c13
-rw-r--r--sys/dev/isa/pcppi.c10
2 files changed, 8 insertions, 15 deletions
diff --git a/sys/arch/x86/pci/pcib.c b/sys/arch/x86/pci/pcib.c
index 96490830fdf..160e7c3a295 100644
--- a/sys/arch/x86/pci/pcib.c
+++ b/sys/arch/x86/pci/pcib.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcib.c,v 1.14 2012/01/30 19:41:18 drochner Exp $ */
+/* $NetBSD: pcib.c,v 1.15 2012/04/06 20:38:52 plunky Exp $ */
/*-
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.14 2012/01/30 19:41:18 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.15 2012/04/06 20:38:52 plunky Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -195,13 +195,8 @@ pcibattach(device_t parent, device_t self, void *aux)
sc->sc_pc = pa->pa_pc;
sc->sc_tag = pa->pa_tag;
- /* If a more specific pcib implementation has already registered a
- * power handler, don't overwrite it.
- */
- if (!device_pmf_is_registered(self)) {
- if (!pmf_device_register(self, NULL, NULL))
- aprint_error_dev(self, "couldn't establish power handler\n");
- }
+ if (!pmf_device_register(self, NULL, NULL))
+ aprint_error_dev(self, "couldn't establish power handler\n");
config_defer(self, pcib_callback);
}
diff --git a/sys/dev/isa/pcppi.c b/sys/dev/isa/pcppi.c
index 5fa798fa6b9..0f3de03eba2 100644
--- a/sys/dev/isa/pcppi.c
+++ b/sys/dev/isa/pcppi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcppi.c,v 1.41 2011/11/26 15:54:51 drochner Exp $ */
+/* $NetBSD: pcppi.c,v 1.42 2012/04/06 20:33:20 plunky Exp $ */
/*
* Copyright (c) 1996 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.41 2011/11/26 15:54:51 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.42 2012/04/06 20:33:20 plunky Exp $");
#include "attimer.h"
@@ -229,10 +229,8 @@ pcppi_attach(struct pcppi_softc *sc)
#if NATTIMER > 0
config_defer(sc->sc_dv, pcppi_attach_speaker);
#endif
- if (!device_pmf_is_registered(self))
- if (!pmf_device_register(self, NULL, NULL))
- aprint_error_dev(self,
- "couldn't establish power handler\n");
+ if (!pmf_device_register(self, NULL, NULL))
+ aprint_error_dev(self, "couldn't establish power handler\n");
pa.pa_cookie = sc;
config_search_loc(pcppisearch, sc->sc_dv, "pcppi", NULL, &pa);