lkml.org 
[lkml]   [2007]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] Watchdog driver for AT32AP700X devices
On Wed,  6 Jun 2007 16:04:07 +0200
Hans-Christian Egtvedt <hcegtvedt@atmel.com> wrote:

> This patch adds support for the built in watchdog in AT32AP700X devices.
>
> Tested on AT32AP7000 and ATSTK1000.
>
> Hardware documentation can be found in the AT32AP7000 datasheet.
>
> ...
>
> +static int __init at32_wdt_probe(struct platform_device *pdev)
> +{
> + struct resource *regs;
> + int ret;
> +
> + if (wdt) {
> + dev_dbg(&pdev->dev, "only 1 wdt instance supported.\n");
> + return -EBUSY;
> + }
> +
> + regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + if (!regs) {
> + dev_dbg(&pdev->dev, "missing mmio resource\n");
> + return -ENXIO;
> + }
> +
> + wdt = kzalloc(sizeof(struct wdt_at32ap700x), GFP_KERNEL);
> + if (!wdt) {
> + dev_dbg(&pdev->dev, "no memory for wdt structure\n");
> + return -ENOMEM;
> + }
> +
> + wdt->regs = ioremap(regs->start, regs->end - regs->start + 1);

I see an ioremap(), but there are no iounmap()s anywhere.


-
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/

\
 
 \ /
  Last update: 2007-06-08 01:17    [W:0.507 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site