mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [TRIVIAL][PPC] drivers/macintosh/via-pmu.c compile fix
@ 2003-09-03  7:01 Gergely Nagy
  0 siblings, 0 replies; only message in thread
From: Gergely Nagy @ 2003-09-03  7:01 UTC (permalink / raw)
  To: linux-kernel

Hi!

While compiling linux 2.6.0-test4-bk4, I got a weird error that some
initializers are not constants, in the pmu_handle_data()
function. Looking at the given line, there were EXPORT_SYMBOLs, so I
suspected that there's a missing brace somewhere. And that was it:
when CONFIG_PMAC_PBOOK is not set, the last if branch is not
closed. Adding an #else } #endif fixes the problem, patch attached
below.

While there, I also added another #ifdef (probably not too nice, and
there is most certainly a better way) to fix a minor compile warning
about `i' being used uninitialised in via_pmu_dev_init. This patch is
also attached below.

-- 
Gergely Nagy

--- drivers/macintosh/via-pmu.c.orig	2003-09-03 08:43:10.000000000 +0200
+++ drivers/macintosh/via-pmu.c	2003-09-03 08:42:51.000000000 +0200
@@ -1393,7 +1393,8 @@
 		pmu_pass_intr(data, len);
 	} else
 	       pmu_pass_intr(data, len);
-
+#else
+	}
 #endif /* CONFIG_PMAC_PBOOK */
 	goto next;
 }

--- drivers/macintosh/via-pmu.c.old	2003-09-03 08:42:51.000000000 +0200
+++ drivers/macintosh/via-pmu.c	2003-09-03 08:46:08.000000000 +0200
@@ -493,7 +493,9 @@
 	/* Create /proc/pmu */
 	proc_pmu_root = proc_mkdir("pmu", 0);
 	if (proc_pmu_root) {
+#ifdef CONFIG_PMAC_PBOOK
 		int i;
+#endif
 		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,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-09-03  7:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-03  7:01 [TRIVIAL][PPC] drivers/macintosh/via-pmu.c compile fix Gergely Nagy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®