On Wed, 6 Jun 2007 16:04:07 +0200 Hans-Christian Egtvedt <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/