From bec4f749cb75d30cebf9837985a06474f595f3ae Mon Sep 17 00:00:00 2001 From: Thomas Koeller Date: Wed, 6 Dec 2006 01:45:26 +0100 Subject: [WATCHDOG] rm9k_wdt: fix compilation Driver did not compile any more. Someone moved the definition of 'struct miscdevice miscdev' to a place near the end of the file, after some code that was refering to this variable. Signed-off-by: Thomas Koeller Signed-off-by: Wim Van Sebroeck --- drivers/char/watchdog/rm9k_wdt.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/char/watchdog/rm9k_wdt.c b/drivers/char/watchdog/rm9k_wdt.c index ec3909371c21..bc7def48e0e6 100644 --- a/drivers/char/watchdog/rm9k_wdt.c +++ b/drivers/char/watchdog/rm9k_wdt.c @@ -94,6 +94,26 @@ module_param(nowayout, bool, 0444); MODULE_PARM_DESC(nowayout, "Watchdog cannot be disabled once started"); +/* Kernel interfaces */ +static struct file_operations fops = { + .owner = THIS_MODULE, + .open = wdt_gpi_open, + .release = wdt_gpi_release, + .write = wdt_gpi_write, + .unlocked_ioctl = wdt_gpi_ioctl, +}; + +static struct miscdevice miscdev = { + .minor = WATCHDOG_MINOR, + .name = wdt_gpi_name, + .fops = &fops, +}; + +static struct notifier_block wdt_gpi_shutdown = { + .notifier_call = wdt_gpi_notify, +}; + + /* Interrupt handler */ static irqreturn_t wdt_gpi_irqhdl(int irq, void *ctxt, struct pt_regs *regs) { @@ -312,26 +332,6 @@ wdt_gpi_notify(struct notifier_block *this, unsigned long code, void *unused) } -/* Kernel interfaces */ -static struct file_operations fops = { - .owner = THIS_MODULE, - .open = wdt_gpi_open, - .release = wdt_gpi_release, - .write = wdt_gpi_write, - .unlocked_ioctl = wdt_gpi_ioctl, -}; - -static struct miscdevice miscdev = { - .minor = WATCHDOG_MINOR, - .name = wdt_gpi_name, - .fops = &fops, -}; - -static struct notifier_block wdt_gpi_shutdown = { - .notifier_call = wdt_gpi_notify, -}; - - /* Init & exit procedures */ static const struct resource * wdt_gpi_get_resource(struct platform_device *pdv, const char *name, -- cgit v1.2.1 From 74e86ab884fb491c208905bdc32a9d95740be583 Mon Sep 17 00:00:00 2001 From: Thomas Koeller Date: Wed, 6 Dec 2006 01:45:39 +0100 Subject: [WATCHDOG] rm9k_wdt: fix interrupt handler arguments Removed 'struct pt_regs *' from interrupt handler arguments. Signed-off-by: Thomas Koeller Signed-off-by: Wim Van Sebroeck --- drivers/char/watchdog/rm9k_wdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/watchdog/rm9k_wdt.c b/drivers/char/watchdog/rm9k_wdt.c index bc7def48e0e6..7576a13e86bc 100644 --- a/drivers/char/watchdog/rm9k_wdt.c +++ b/drivers/char/watchdog/rm9k_wdt.c @@ -47,7 +47,7 @@ /* Function prototypes */ -static irqreturn_t wdt_gpi_irqhdl(int, void *, struct pt_regs *); +static irqreturn_t wdt_gpi_irqhdl(int, void *); static void wdt_gpi_start(void); static void wdt_gpi_stop(void); static void wdt_gpi_set_timeout(unsigned int); @@ -115,7 +115,7 @@ static struct notifier_block wdt_gpi_shutdown = { /* Interrupt handler */ -static irqreturn_t wdt_gpi_irqhdl(int irq, void *ctxt, struct pt_regs *regs) +static irqreturn_t wdt_gpi_irqhdl(int irq, void *ctxt) { if (!unlikely(__raw_readl(wd_regs + 0x0008) & 0x1)) return IRQ_NONE; -- cgit v1.2.1 From e0b79e0bc261ad320f6c218ac6823f7ca859171f Mon Sep 17 00:00:00 2001 From: Andrew Victor Date: Mon, 4 Dec 2006 15:56:18 +0200 Subject: [WATCHDOG] watchdog miscdevice patch It looks like the recent changes to 'struct miscdevice' have impacted some of the Watchdog drivers. at91rm9200_wdt.c:205: error: 'struct miscdevice' has no member named 'dev' For the AT91RM9200 driver I just replaced "miscdevice.dev" with "miscdevice.parent". The mpcore_wdt.c and omap_wdt.c seem similarly affected. Signed-off-by: Andrew Victor Signed-off-by: Wim Van Sebroeck --- drivers/char/watchdog/at91rm9200_wdt.c | 6 +++--- drivers/char/watchdog/mpcore_wdt.c | 2 +- drivers/char/watchdog/omap_wdt.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/char/watchdog/at91rm9200_wdt.c b/drivers/char/watchdog/at91rm9200_wdt.c index 4e7a1145e78f..c8da2b0a1cd8 100644 --- a/drivers/char/watchdog/at91rm9200_wdt.c +++ b/drivers/char/watchdog/at91rm9200_wdt.c @@ -202,9 +202,9 @@ static int __init at91wdt_probe(struct platform_device *pdev) { int res; - if (at91wdt_miscdev.dev) + if (at91wdt_miscdev.parent) return -EBUSY; - at91wdt_miscdev.dev = &pdev->dev; + at91wdt_miscdev.parent = &pdev->dev; res = misc_register(&at91wdt_miscdev); if (res) @@ -220,7 +220,7 @@ static int __exit at91wdt_remove(struct platform_device *pdev) res = misc_deregister(&at91wdt_miscdev); if (!res) - at91wdt_miscdev.dev = NULL; + at91wdt_miscdev.parent = NULL; return res; } diff --git a/drivers/char/watchdog/mpcore_wdt.c b/drivers/char/watchdog/mpcore_wdt.c index 3404a9c67f08..e88947f8fe53 100644 --- a/drivers/char/watchdog/mpcore_wdt.c +++ b/drivers/char/watchdog/mpcore_wdt.c @@ -347,7 +347,7 @@ static int __devinit mpcore_wdt_probe(struct platform_device *dev) goto err_free; } - mpcore_wdt_miscdev.dev = &dev->dev; + mpcore_wdt_miscdev.parent = &dev->dev; ret = misc_register(&mpcore_wdt_miscdev); if (ret) { dev_printk(KERN_ERR, _dev, "cannot register miscdev on minor=%d (err=%d)\n", diff --git a/drivers/char/watchdog/omap_wdt.c b/drivers/char/watchdog/omap_wdt.c index 5dbd7dc2936f..6c6f97332dbb 100644 --- a/drivers/char/watchdog/omap_wdt.c +++ b/drivers/char/watchdog/omap_wdt.c @@ -290,7 +290,7 @@ static int __init omap_wdt_probe(struct platform_device *pdev) omap_wdt_disable(); omap_wdt_adjust_timeout(timer_margin); - omap_wdt_miscdev.dev = &pdev->dev; + omap_wdt_miscdev.parent = &pdev->dev; ret = misc_register(&omap_wdt_miscdev); if (ret) goto fail; -- cgit v1.2.1