]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/cs5535_gpio.c
[PATCH] i2Output always takes kernel data now
[linux-2.6-omap-h63xx.git] / drivers / char / cs5535_gpio.c
index 5d72f50de1ac97c6e377fb6c5e0d0d4192016983..8ce3f34cfc2226ac213f1eeec63b84908c4313e8 100644 (file)
@@ -158,7 +158,7 @@ static int cs5535_gpio_open(struct inode *inode, struct file *file)
        return nonseekable_open(inode, file);
 }
 
-static struct file_operations cs5535_gpio_fops = {
+static const struct file_operations cs5535_gpio_fops = {
        .owner  = THIS_MODULE,
        .write  = cs5535_gpio_write,
        .read   = cs5535_gpio_read,
@@ -241,9 +241,10 @@ static int __init cs5535_gpio_init(void)
 static void __exit cs5535_gpio_cleanup(void)
 {
        dev_t dev_id = MKDEV(major, 0);
+
+       cdev_del(&cs5535_gpio_cdev);
        unregister_chrdev_region(dev_id, CS5535_GPIO_COUNT);
-       if (gpio_base != 0)
-               release_region(gpio_base, CS5535_GPIO_SIZE);
+       release_region(gpio_base, CS5535_GPIO_SIZE);
 }
 
 module_init(cs5535_gpio_init);