summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorplunky <plunky@NetBSD.org>2012-04-06 20:16:58 +0000
committerplunky <plunky@NetBSD.org>2012-04-06 20:16:58 +0000
commit8b2e8e843c69a3fb3842794854af2f4b1ca5cfa5 (patch)
tree0a8ee2c483ab9ad7986e6c9ac5b7b6774f57c166 /sys/dev
parentc3d69c1b3d7aa765c8255761ad1f3d6959d9de04 (diff)
device_pmf_is_registered() is not required
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/isa/spkr.c8
-rw-r--r--sys/dev/pci/agp.c11
2 files changed, 7 insertions, 12 deletions
diff --git a/sys/dev/isa/spkr.c b/sys/dev/isa/spkr.c
index 41f8dd16ad7..0cdd76b1a5a 100644
--- a/sys/dev/isa/spkr.c
+++ b/sys/dev/isa/spkr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: spkr.c,v 1.32 2012/02/01 02:01:28 matt Exp $ */
+/* $NetBSD: spkr.c,v 1.33 2012/04/06 20:16:58 plunky Exp $ */
/*
* Copyright (c) 1990 Eric S. Raymond (esr@snark.thyrsus.com)
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.32 2012/02/01 02:01:28 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.33 2012/04/06 20:16:58 plunky Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -409,10 +409,8 @@ spkrattach(device_t parent, device_t self, void *aux)
printf("\n");
ppicookie = ((struct pcppi_attach_args *)aux)->pa_cookie;
spkr_attached = 1;
- if (!device_pmf_is_registered(self)
- && !pmf_device_register(self, NULL, NULL))
+ if (!pmf_device_register(self, NULL, NULL))
aprint_error_dev(self, "couldn't establish power handler\n");
-
}
int
diff --git a/sys/dev/pci/agp.c b/sys/dev/pci/agp.c
index d3f0321b30e..a0791e66cb6 100644
--- a/sys/dev/pci/agp.c
+++ b/sys/dev/pci/agp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: agp.c,v 1.79 2011/04/04 20:37:56 dyoung Exp $ */
+/* $NetBSD: agp.c,v 1.80 2012/04/06 20:24:28 plunky Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
@@ -65,7 +65,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.79 2011/04/04 20:37:56 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.80 2012/04/06 20:24:28 plunky Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -374,11 +374,8 @@ agpattach(device_t parent, device_t self, void *aux)
else
sc->as_chipc = NULL;
- if (!device_pmf_is_registered(self)) {
- if (!pmf_device_register(self, NULL, agp_resume))
- aprint_error_dev(self, "couldn't establish power "
- "handler\n");
- }
+ if (!pmf_device_register(self, NULL, agp_resume))
+ aprint_error_dev(self, "couldn't establish power handler\n");
}
CFATTACH_DECL_NEW(agp, sizeof(struct agp_softc),