Re: drivers/watchdog/geodewdt.c: build fix

From: David Brigada
Date: Fri May 30 2008 - 13:25:33 EST


I was trying to compile a kernel with this support, and noticed this bug, too. The interface was changed in commit fa28e067c3b8af96c79c060e163b1387c172ae75, with the message:

> We had planned to use the 'owner' field for allowing re-allocation of
> MFGPTs; however, doing it by module owner name isn't flexible enough. > So, drop this for now. If it turns out that we need timers in
> modules, we'll need to come up with a scheme that matches the
> write-once fields of the MFGPTx_SETUP register, and drops ponies from > the sky.

I may be reading this incorrectly, but it seems that to do this correctly, we would either need to drop module support for this driver or rework the MFGPT code. I'm not sure there's a kernel hook for dropping ponies from the sky quite yet.

Thanks,
David Brigada

Jordan Crouse wrote:
On 30/05/08 17:02 +0200, Ingo Molnar wrote:
* Wim Van Sebroeck <wim@xxxxxxxxx> wrote:

Author: Jordan Crouse <jordan.crouse@xxxxxxx>
Date: Mon Jan 21 10:07:00 2008 -0700

[WATCHDOG] Add a watchdog driver based on the CS5535/CS5536 MFGPT timers
-tip testing found the following build failure on latest -git:

drivers/watchdog/geodewdt.c: In function 'geodewdt_probe':
drivers/watchdog/geodewdt.c:225: error: too many arguments to function 'geode_mfgpt_alloc_timer'
make[1]: *** [drivers/watchdog/geodewdt.o] Error 1
make: *** [drivers/watchdog/geodewdt.o] Error 2

with this config:

http://redhat.com/~mingo/misc/config-Fri_May_30_15_19_52_CEST_2008.bad

find the fix below.

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
Acked-by: Jordan Crouse <jordan.crouse@xxxxxxx>

---
drivers/watchdog/geodewdt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Index: tip/drivers/watchdog/geodewdt.c
===================================================================
--- tip.orig/drivers/watchdog/geodewdt.c
+++ tip/drivers/watchdog/geodewdt.c
@@ -221,8 +221,7 @@ geodewdt_probe(struct platform_device *d
{
int ret, timer;
- timer = geode_mfgpt_alloc_timer(MFGPT_TIMER_ANY,
- MFGPT_DOMAIN_WORKING, THIS_MODULE);
+ timer = geode_mfgpt_alloc_timer(MFGPT_TIMER_ANY, MFGPT_DOMAIN_WORKING);
if (timer == -1) {
printk(KERN_ERR "geodewdt: No timers were available\n");



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/