Input: keyboard: sprd_eic: Remove build warnings 28/159628/3
authorWook Song <wook16.song@samsung.com>
Fri, 10 Nov 2017 07:25:05 +0000 (16:25 +0900)
committerWook Song <wook16.song@samsung.com>
Fri, 10 Nov 2017 08:00:58 +0000 (17:00 +0900)
This patch removes build warnings caused by passing wrong pointer type
as a function argument type. The build warnings caused by unused
variables/functions, and variable declarations in the middle of code are
also removed.

Change-Id: I7cadc6ed8cd8763e5773652e9f4d8cb0e7f46cdb
Signed-off-by: Wook Song <wook16.song@samsung.com>
drivers/input/keyboard/sprd_eic_keys.c

index 077d254..dcaee80 100644 (file)
@@ -199,7 +199,7 @@ static struct sprd_eic_keys_platform_data *sprd_eic_keys_get_devtree_pdata(struc
         int error;
         int nbuttons;
         int i;
-       char *input_name = NULL;
+       const char *input_name = NULL;
        int ret = -1;
 
         node = dev->of_node;
@@ -407,12 +407,13 @@ fail1:
 }
 
 #ifdef CONFIG_PM
-static int sprd_eic_keys_suspend(struct platform_device *dev, pm_message_t state)
+static __maybe_unused int sprd_eic_keys_suspend(struct platform_device *dev,
+               pm_message_t state)
 {
         return 0;
 }
 
-static int sprd_eic_keys_resume(struct platform_device *dev)
+static __maybe_unused int sprd_eic_keys_resume(struct platform_device *dev)
 {
         return 0;
 }
@@ -434,17 +435,21 @@ static struct platform_driver sprd_eic_keys_device_driver = {
 
 static int __init sprd_eic_keys_init(void)
 {
+       struct device_node *node;
+
         ENTER;
 #ifdef HOOK_POWER_KEY
         input_hook_init();
 #endif
 
 /***************************************************************/
-        struct device_node *node = of_find_compatible_node(NULL, NULL, "sprd,sprd-eic-keys");
+        node = of_find_compatible_node(NULL, NULL, "sprd,sprd-eic-keys");
         if(node) {
+                struct platform_device *dev;
+
                 PRINT_INFO("Find the node name:%s\n",node->name);
 
-                struct platform_device *dev = of_find_device_by_node(node);
+                       dev = of_find_device_by_node(node);
                 if(dev)
                         PRINT_INFO("Find the device name:%s\n",dev->name);
                 else