Merge branch 'torvalds/master'
[firefly-linux-kernel-4.4.55.git] / drivers / input / keyboard / spear-keyboard.c
index cb1e8f614631582b342546458d9c1fc462b55df7..623d451767e3839c44dcefb43bd10325f9ad6330 100644 (file)
@@ -3,7 +3,7 @@
  * Based on omap-keypad driver
  *
  * Copyright (C) 2010 ST Microelectronics
- * Rajeev Kumar<rajeev-dlh.kumar@st.com>
+ * Rajeev Kumar <rajeevkumar.linux@gmail.com>
  *
  * This file is licensed under the terms of the GNU General Public
  * License version 2. This program is licensed "as is" without any
@@ -12,7 +12,6 @@
 
 #include <linux/clk.h>
 #include <linux/errno.h>
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/input.h>
 #include <linux/io.h>
@@ -191,12 +190,6 @@ static int spear_kbd_probe(struct platform_device *pdev)
        int irq;
        int error;
 
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res) {
-               dev_err(&pdev->dev, "no keyboard resource defined\n");
-               return -EBUSY;
-       }
-
        irq = platform_get_irq(pdev, 0);
        if (irq < 0) {
                dev_err(&pdev->dev, "not able to get irq for the device\n");
@@ -228,6 +221,7 @@ static int spear_kbd_probe(struct platform_device *pdev)
                kbd->suspended_rate = pdata->suspended_rate;
        }
 
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        kbd->io_base = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(kbd->io_base))
                return PTR_ERR(kbd->io_base);
@@ -290,7 +284,6 @@ static int spear_kbd_remove(struct platform_device *pdev)
        clk_unprepare(kbd->clk);
 
        device_init_wakeup(&pdev->dev, 0);
-       platform_set_drvdata(pdev, NULL);
 
        return 0;
 }
@@ -392,7 +385,6 @@ static struct platform_driver spear_kbd_driver = {
        .remove         = spear_kbd_remove,
        .driver         = {
                .name   = "keyboard",
-               .owner  = THIS_MODULE,
                .pm     = &spear_kbd_pm_ops,
                .of_match_table = of_match_ptr(spear_kbd_id_table),
        },