summaryrefslogtreecommitdiffstats
path: root/drivers/char/pc8736x_gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/pc8736x_gpio.c')
-rw-r--r--drivers/char/pc8736x_gpio.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/char/pc8736x_gpio.c b/drivers/char/pc8736x_gpio.c
index 1c706ccfdbb3..4005ee0aa11e 100644
--- a/drivers/char/pc8736x_gpio.c
+++ b/drivers/char/pc8736x_gpio.c
@@ -236,7 +236,7 @@ static int pc8736x_gpio_open(struct inode *inode, struct file *file)
return nonseekable_open(inode, file);
}
-static struct file_operations pc8736x_gpio_fops = {
+static const struct file_operations pc8736x_gpio_fops = {
.owner = THIS_MODULE,
.open = pc8736x_gpio_open,
.write = nsc_gpio_write,
@@ -319,9 +319,10 @@ static int __init pc8736x_gpio_init(void)
return 0;
undo_platform_dev_add:
- platform_device_put(pdev);
+ platform_device_del(pdev);
undo_platform_dev_alloc:
- kfree(pdev);
+ platform_device_put(pdev);
+
return rc;
}
OpenPOWER on IntegriCloud