Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Invert logic around nested pmf(9) registrations for read...
details: https://anonhg.NetBSD.org/src/rev/a4831f8e917d
branches: trunk
changeset: 747096:a4831f8e917d
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Wed Sep 02 10:43:24 2009 +0000
description:
Invert logic around nested pmf(9) registrations for readability.
diffstat:
sys/arch/sgimips/mace/if_mec.c | 10 +++++-----
sys/dev/ic/dp83932.c | 10 +++++-----
2 files changed, 10 insertions(+), 10 deletions(-)
diffs (65 lines):
diff -r 6cebc2bd91fc -r a4831f8e917d sys/arch/sgimips/mace/if_mec.c
--- a/sys/arch/sgimips/mace/if_mec.c Wed Sep 02 10:34:04 2009 +0000
+++ b/sys/arch/sgimips/mace/if_mec.c Wed Sep 02 10:43:24 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_mec.c,v 1.37 2009/09/01 17:10:42 tsutsui Exp $ */
+/* $NetBSD: if_mec.c,v 1.38 2009/09/02 10:43:24 tsutsui Exp $ */
/*-
* Copyright (c) 2004, 2008 Izumi Tsutsui. All rights reserved.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.37 2009/09/01 17:10:42 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.38 2009/09/02 10:43:24 tsutsui Exp $");
#include "opt_ddb.h"
#include "bpfilter.h"
@@ -726,10 +726,10 @@
#endif
/* set shutdown hook to reset interface on powerdown */
- if (!pmf_device_register1(self, NULL, NULL, mec_shutdown))
+ if (pmf_device_register1(self, NULL, NULL, mec_shutdown))
+ pmf_class_network_register(self, &sc->sc_ethercom.ec_if);
+ else
aprint_error_dev(self, "couldn't establish power handler\n");
- else
- pmf_class_network_register(self, &sc->sc_ethercom.ec_if);
return;
diff -r 6cebc2bd91fc -r a4831f8e917d sys/dev/ic/dp83932.c
--- a/sys/dev/ic/dp83932.c Wed Sep 02 10:34:04 2009 +0000
+++ b/sys/dev/ic/dp83932.c Wed Sep 02 10:43:24 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dp83932.c,v 1.29 2009/09/01 17:12:42 tsutsui Exp $ */
+/* $NetBSD: dp83932.c,v 1.30 2009/09/02 10:43:25 tsutsui Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dp83932.c,v 1.29 2009/09/01 17:12:42 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dp83932.c,v 1.30 2009/09/02 10:43:25 tsutsui Exp $");
#include "bpfilter.h"
@@ -222,11 +222,11 @@
/*
* Make sure the interface is shutdown during reboot.
*/
- if (!pmf_device_register1(sc->sc_dev, NULL, NULL, sonic_shutdown))
+ if (pmf_device_register1(sc->sc_dev, NULL, NULL, sonic_shutdown))
+ pmf_class_network_register(sc->sc_dev, &sc->sc_ethercom.ec_if);
+ else
aprint_error_dev(sc->sc_dev,
"couldn't establish power handler\n");
- else
- pmf_class_network_register(sc->sc_dev, &sc->sc_ethercom.ec_if);
return;
Home |
Main Index |
Thread Index |
Old Index