
From: Christoph Hellwig <hch@lst.de>

There's some scoping problems so we get unused variables for that config.

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/macintosh/via-pmu.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff -puN drivers/macintosh/via-pmu.c~fix-compile-warnings-in-via-pmuc-for-config_pmac_pbook drivers/macintosh/via-pmu.c
--- 25/drivers/macintosh/via-pmu.c~fix-compile-warnings-in-via-pmuc-for-config_pmac_pbook	2004-09-02 21:05:22.271815088 -0700
+++ 25-akpm/drivers/macintosh/via-pmu.c	2004-09-02 21:05:22.276814328 -0700
@@ -137,7 +137,6 @@ static int data_len;
 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;
@@ -154,6 +153,7 @@ static int drop_interrupts;
 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];
 
@@ -493,12 +493,9 @@ static int __init via_pmu_dev_init(void)
 	/* 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);
@@ -506,6 +503,11 @@ static int __init via_pmu_dev_init(void)
 						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;
_
