Commit c12bcd74 authored by Dave Jones's avatar Dave Jones

[PATCH] hd64465 region handling cleanup

parent b5dac75e
...@@ -165,10 +165,17 @@ void hd64465_gpio_unregister_irq(int portpin) ...@@ -165,10 +165,17 @@ void hd64465_gpio_unregister_irq(int portpin)
static int __init hd64465_gpio_init(void) static int __init hd64465_gpio_init(void)
{ {
/* TODO: check return values */ int err;
request_region(HD64465_REG_GPACR, 0x1000, MODNAME);
request_irq(HD64465_IRQ_GPIO, hd64465_gpio_interrupt, if (!request_region(HD64465_REG_GPACR, 0x1000, MODNAME))
return -EIO;
err = request_irq (HD64465_IRQ_GPIO, hd64465_gpio_interrupt,
SA_INTERRUPT, MODNAME, 0); SA_INTERRUPT, MODNAME, 0);
if (err) {
printk(KERN_ERR"HD64465: Unable to get irq %d.\n", HD64465_IRQ_GPIO);
release_region(HD64465_REG_GPACR, 0x1000);
return err;
}
printk("HD64465 GPIO layer on irq %d\n", HD64465_IRQ_GPIO); printk("HD64465 GPIO layer on irq %d\n", HD64465_IRQ_GPIO);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment