#include <asm/system.h>
#include <asm/sections.h>
#include <asm/irq.h>
-#include <asm/hardirq.h>
#include <asm/pmac_feature.h>
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
static volatile int adb_int_pending;
static volatile int disable_poll;
static struct adb_request bright_req_1, bright_req_2;
-static unsigned long async_req_locks;
static struct device_node *vias;
static int pmu_kind = PMU_UNKNOWN;
static int pmu_fully_inited = 0;
static int option_lid_wakeup = 1;
static int sleep_in_progress;
static int can_sleep;
+static unsigned long async_req_locks;
#endif /* CONFIG_PMAC_PBOOK */
static unsigned int pmu_irq_stats[11];
/* Create /proc/pmu */
proc_pmu_root = proc_mkdir("pmu", NULL);
if (proc_pmu_root) {
- int i;
- proc_pmu_info = create_proc_read_entry("info", 0, proc_pmu_root,
- proc_get_info, NULL);
- proc_pmu_irqstats = create_proc_read_entry("interrupts", 0, proc_pmu_root,
- proc_get_irqstats, NULL);
#ifdef CONFIG_PMAC_PBOOK
+ int i;
+
for (i=0; i<pmu_battery_count; i++) {
char title[16];
sprintf(title, "battery_%d", i);
proc_get_batt, (void *)i);
}
#endif /* CONFIG_PMAC_PBOOK */
+
+ proc_pmu_info = create_proc_read_entry("info", 0, proc_pmu_root,
+ proc_get_info, NULL);
+ proc_pmu_irqstats = create_proc_read_entry("interrupts", 0, proc_pmu_root,
+ proc_get_irqstats, NULL);
proc_pmu_options = create_proc_entry("options", 0600, proc_pmu_root);
if (proc_pmu_options) {
proc_pmu_options->nlink = 1;
pmu_power_flags &= ~PMU_PWR_AC_PRESENT;
+ capa = max = amperage = voltage = 0;
+
if (req->reply[1] & 0x04) {
bat_flags |= PMU_BATT_PRESENT;
switch(req->reply[0]) {
req->reply_len, req->reply[0], req->reply[1], req->reply[2], req->reply[3]);
break;
}
- } else
- capa = max = amperage = voltage = 0;
+ }
if ((req->reply[1] & 0x01) && (amperage > 0))
bat_flags |= PMU_BATT_CHARGING;
pmu_sr_intr(struct pt_regs *regs)
{
struct adb_request *req;
- int bite;
+ int bite = 0;
if (via[B] & TREQ) {
printk(KERN_ERR "PMU: spurious SR intr (%x)\n", via[B]);