Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys device_pmf_is_registered() is not required
details: https://anonhg.NetBSD.org/src/rev/42e67bc5b0ac
branches: trunk
changeset: 778620:42e67bc5b0ac
user: plunky <plunky%NetBSD.org@localhost>
date: Fri Apr 06 20:33:20 2012 +0000
description:
device_pmf_is_registered() is not required
diffstat:
sys/arch/x86/pci/pcib.c | 13 ++++---------
sys/dev/isa/pcppi.c | 10 ++++------
2 files changed, 8 insertions(+), 15 deletions(-)
diffs (65 lines):
diff -r c7eae1e3570d -r 42e67bc5b0ac sys/arch/x86/pci/pcib.c
--- a/sys/arch/x86/pci/pcib.c Fri Apr 06 20:16:58 2012 +0000
+++ b/sys/arch/x86/pci/pcib.c Fri Apr 06 20:33:20 2012 +0000
@@ -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 @@
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 -r c7eae1e3570d -r 42e67bc5b0ac sys/dev/isa/pcppi.c
--- a/sys/dev/isa/pcppi.c Fri Apr 06 20:16:58 2012 +0000
+++ b/sys/dev/isa/pcppi.c Fri Apr 06 20:33:20 2012 +0000
@@ -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 @@
#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);
Home |
Main Index |
Thread Index |
Old Index