Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev device_pmf_is_registered() is not required



details:   https://anonhg.NetBSD.org/src/rev/c7eae1e3570d
branches:  trunk
changeset: 778619:c7eae1e3570d
user:      plunky <plunky%NetBSD.org@localhost>
date:      Fri Apr 06 20:16:58 2012 +0000

description:
device_pmf_is_registered() is not required

diffstat:

 sys/dev/isa/spkr.c |   8 +++-----
 sys/dev/pci/agp.c  |  11 ++++-------
 2 files changed, 7 insertions(+), 12 deletions(-)

diffs (62 lines):

diff -r 500ef195d7f9 -r c7eae1e3570d sys/dev/isa/spkr.c
--- a/sys/dev/isa/spkr.c        Fri Apr 06 20:10:28 2012 +0000
+++ b/sys/dev/isa/spkr.c        Fri Apr 06 20:16:58 2012 +0000
@@ -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@localhost)
@@ -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 @@
        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 -r 500ef195d7f9 -r c7eae1e3570d sys/dev/pci/agp.c
--- a/sys/dev/pci/agp.c Fri Apr 06 20:10:28 2012 +0000
+++ b/sys/dev/pci/agp.c Fri Apr 06 20:16:58 2012 +0000
@@ -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 @@
        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),



Home | Main Index | Thread Index | Old Index