input: touchscreen: resolve compilation time warnings
Sanjay Singh Rawat [Mon, 26 Mar 2012 10:53:07 +0000 (15:53 +0530)]
bug 949219

Change-Id: I408fb008a70c7ea546384e68ac50c1f0604fc39a
Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com>
Reviewed-on: http://git-master/r/92276
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

drivers/input/touchscreen/rmi4/rmi_f09.c

index 0ec980d..4328d49 100644 (file)
@@ -86,13 +86,13 @@ static ssize_t rmi_f09_HostTestEn_show(struct device *dev,
 
 static ssize_t rmi_f09_HostTestEn_store(struct device *dev,
                                      struct device_attribute *attr,
-                                       char *buf, size_t count);
-
-static ssize_t rmi_f09_InternalLimits_show(struct device *dev,
-                                     struct device_attribute *attr, char *buf);
+                                       const char *buf, size_t count);
 
 static ssize_t rmi_f09_Result_Register_Count_show(struct device *dev,
                                      struct device_attribute *attr, char *buf);
+#if defined(RMI_SYS_ATTR)
+static ssize_t rmi_f09_InternalLimits_show(struct device *dev,
+                                     struct device_attribute *attr, char *buf);
 
 static ssize_t rmi_f09_Overall_BIST_Result_show(struct device *dev,
                                      struct device_attribute *attr, char *buf);
@@ -100,6 +100,7 @@ static ssize_t rmi_f09_Overall_BIST_Result_show(struct device *dev,
 static ssize_t rmi_f09_Overall_BIST_Result_store(struct device *dev,
                                       struct device_attribute *attr,
                                       const char *buf, size_t count);
+#endif
 
 static struct device_attribute attrs[] = {
        __ATTR(Limit_Register_Count, RMI_RO_ATTR,
@@ -119,7 +120,6 @@ static int rmi_f09_init(struct rmi_function_container *fc)
        struct rmi_fn_09_data  *f09;
        u8 query_base_addr;
        int rc;
-       int i;
        int attr_count = 0;
        int retval = 0;
 
@@ -171,8 +171,8 @@ static void rmi_f09_remove(struct rmi_function_container *fc)
 {
        struct rmi_fn_09_data *data = fc->data;
        if (data) {
-               kfree(data->query.Limit_Register_Count);
-               kfree(data->query.f09_bist_query1);
+               kfree(&data->query.Limit_Register_Count);
+               kfree(&data->query.f09_bist_query1);
        }
        kfree(fc->data);
 }
@@ -230,7 +230,7 @@ static ssize_t rmi_f09_HostTestEn_show(struct device *dev,
 
 static ssize_t rmi_f09_HostTestEn_store(struct device *dev,
                                      struct device_attribute *attr,
-                                       char *buf, size_t count)
+                                       const char *buf, size_t count)
 {
        struct rmi_function_container *fc;
        struct rmi_fn_09_data *data;
@@ -264,7 +264,8 @@ static ssize_t rmi_f09_HostTestEn_store(struct device *dev,
 
 }
 
-static ssize_t rmi_f09_InternalLimits_show(struct device *dev,
+#if defined(RMI_SYS_ATTR)
+ ssize_t rmi_f09_InternalLimits_show(struct device *dev,
                                        struct device_attribute *attr,
                                        char *buf)
 {
@@ -276,6 +277,7 @@ static ssize_t rmi_f09_InternalLimits_show(struct device *dev,
        return snprintf(buf, PAGE_SIZE, "%u\n",
                        data->query.InternalLimits);
 }
+#endif
 
 static ssize_t rmi_f09_Result_Register_Count_show(struct device *dev,
                                        struct device_attribute *attr,