Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/sysmon If the AC adapter is flagged with SME_DISABLE...



details:   https://anonhg.NetBSD.org/src/rev/f8159a7cce28
branches:  trunk
changeset: 751452:f8159a7cce28
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Thu Feb 04 18:06:53 2010 +0000

description:
If the AC adapter is flagged with SME_DISABLE_REFRESH, don't try to call
its refresh() callback.  Just assume that its value has been properly
updated by other means.

diffstat:

 sys/dev/sysmon/sysmon_envsys_events.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r a6aea4a059a6 -r f8159a7cce28 sys/dev/sysmon/sysmon_envsys_events.c
--- a/sys/dev/sysmon/sysmon_envsys_events.c     Thu Feb 04 14:04:59 2010 +0000
+++ b/sys/dev/sysmon/sysmon_envsys_events.c     Thu Feb 04 18:06:53 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_envsys_events.c,v 1.77 2010/01/30 02:46:52 pgoyette Exp $ */
+/* $NetBSD: sysmon_envsys_events.c,v 1.78 2010/02/04 18:06:53 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.77 2010/01/30 02:46:52 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.78 2010/02/04 18:06:53 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -888,7 +888,8 @@
                if (edata->units == ENVSYS_INDICATOR) {
                        sensor = true;
                        /* refresh current sensor */
-                       (*sme->sme_refresh)(sme, edata);
+                       if ((sme->sme_flags & SME_DISABLE_REFRESH) == 0)
+                               (*sme->sme_refresh)(sme, edata);
                        if (edata->value_cur)
                                return false;
                }



Home | Main Index | Thread Index | Old Index