sensors: compass: fix null point on m_layout
author郭毅 <gy@rock-chips.com>
Wed, 19 Mar 2014 08:26:32 +0000 (16:26 +0800)
committer郭毅 <gy@rock-chips.com>
Wed, 19 Mar 2014 08:35:12 +0000 (16:35 +0800)
drivers/input/sensors/compass/ak09911.c
drivers/input/sensors/compass/ak8963.c
drivers/input/sensors/compass/ak8975.c

index ac7c681d763fcca3dbcb9a812b70e3bbb21888ea..15e52c5f448a512d0d53bb2da43b32d6a358c251 100755 (executable)
@@ -624,8 +624,8 @@ static long compass_dev_ioctl(struct file *file,
        \r
        case ECS_IOCTL_GET_PLATFORM_DATA:                       \r
                DBG("%s:ECS_IOCTL_GET_PLATFORM_DATA start\n",__func__);\r
-               memcpy(compass.m_layout, sensor->pdata->m_layout, sizeof(sensor->pdata->m_layout));\r
-               memcpy(compass.project_name, sensor->pdata->project_name, sizeof(sensor->pdata->project_name));\r
+       //      memcpy(compass.m_layout, sensor->pdata->m_layout, sizeof(sensor->pdata->m_layout));\r
+       //      memcpy(compass.project_name, sensor->pdata->project_name, sizeof(sensor->pdata->project_name));\r
                ret = copy_to_user(argp, &compass, sizeof(compass));\r
                if(ret < 0)\r
                {\r
index 318377e03395f4721bd5a9228077233a2bb109ca..d9e4c0ebe4adce605aa84c5125612d269739320c 100755 (executable)
@@ -625,8 +625,8 @@ static long compass_dev_ioctl(struct file *file,
        \r
        case ECS_IOCTL_GET_PLATFORM_DATA:                       \r
                DBG("%s:ECS_IOCTL_GET_PLATFORM_DATA start\n",__func__);\r
-               memcpy(compass.m_layout, sensor->pdata->m_layout, sizeof(sensor->pdata->m_layout));\r
-               memcpy(compass.project_name, sensor->pdata->project_name, sizeof(sensor->pdata->project_name));\r
+               //memcpy(compass.m_layout, sensor->pdata->m_layout, sizeof(sensor->pdata->m_layout));\r
+               //memcpy(compass.project_name, sensor->pdata->project_name, sizeof(sensor->pdata->project_name));\r
                ret = copy_to_user(argp, &compass, sizeof(compass));\r
                if(ret < 0)\r
                {\r
index 1ed0f29712ab421f7fc2d2cf495d4c3ae719cae2..3d372cb7230eba211aa039e9fda2838b33569dd1 100755 (executable)
@@ -547,8 +547,8 @@ static long compass_dev_ioctl(struct file *file,
                        break;\r
                case ECS_IOCTL_GET_PLATFORM_DATA:                       \r
                        DBG("%s:ECS_IOCTL_GET_PLATFORM_DATA start\n",__func__);\r
-                       memcpy(compass.m_layout, sensor->pdata->m_layout, sizeof(sensor->pdata->m_layout));\r
-                       memcpy(compass.project_name, sensor->pdata->project_name, sizeof(sensor->pdata->project_name));\r
+                       //memcpy(compass.m_layout, sensor->pdata->m_layout, sizeof(sensor->pdata->m_layout));\r
+                       //memcpy(compass.project_name, sensor->pdata->project_name, sizeof(sensor->pdata->project_name));\r
                        ret = copy_to_user(argp, &compass, sizeof(compass));\r
                        if(ret < 0)\r
                        {\r