]> xenbits.xensource.com Git - qemu-xen-4.3-testing.git/commitdiff
Battery management - disable for stubdom
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 23 Oct 2008 09:26:02 +0000 (10:26 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 23 Oct 2008 09:26:02 +0000 (10:26 +0100)
The battery management arrangements do not compile for stubdom as they
use direct IO, so for the moment I have stubbed them out.

hw/battery_mgmt.c
hw/battery_mgmt.h

index 38b565845e1c4b43714adbf17a1581fda00fc1aa..0cce054fec984a2e00c09fdf870ca203344bf86c 100644 (file)
@@ -32,6 +32,8 @@
 #include "isa.h" //register_ioport_read declaration
 #include "battery_mgmt.h"
 
+#ifndef CONFIG_NO_BATTERY_MGMT
+
 #include <sys/io.h>
 
 //#define BATTERY_MGMT_DEBUG
@@ -295,3 +297,8 @@ void battery_mgmt_init(PCIDevice *device)
 #endif    
 }
 
+#else
+
+void battery_mgmt_init(PCIDevice *device) { }
+
+#endif
index 9b9b427d48f13e5f0da3fa7b480462ebea20941c..dd60160ec06869f2e00bb33843b98aac1cc53c85 100644 (file)
 #ifndef _BATTERY_MGMT_H
 #define _BATTERY_MGMT_H
 
+#ifdef CONFIG_STUBDOM
+#define CONFIG_NO_BATTERY_MGMT
+#endif
+
 enum POWER_MGMT_MODE { PM_MODE_NONE = 0, PM_MODE_PT, PM_MODE_NON_PT };
 enum BATTERY_INFO_TYPE { BATT_NONE, BIF, BST };
 typedef struct battery_state_info {