Messages in this thread Patches in this message | | | Date | Wed, 03 Sep 2003 09:01:06 +0200 | From | Gergely Nagy <> | Subject | [TRIVIAL][PPC] drivers/macintosh/via-pmu.c compile fix |
| |
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, - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |