diff --git a/model/input/driver/hdf_input_device_manager.c b/model/input/driver/hdf_input_device_manager.c index 00bdbb28..f0b0b37a 100644 --- a/model/input/driver/hdf_input_device_manager.c +++ b/model/input/driver/hdf_input_device_manager.c @@ -35,7 +35,7 @@ uint32_t TouchPoll(struct file *filep, InputDevice *inputDev, poll_table *wait); static int32_t InputDevIoctl(struct file *filep, int32_t cmd, unsigned long arg) { int32_t ret; - InputDevice *inputdev = (InputDevice *)filep->f_inode->i_private; + InputDevice *inputdev = (InputDevice *)((struct drv_data*)filep->f_vnode->data)->priv; if (inputdev == NULL) { return HDF_FAILURE; } @@ -54,7 +54,7 @@ static int32_t InputDevIoctl(struct file *filep, int32_t cmd, unsigned long arg) static int32_t InputDevOpen(struct file *filep) { - InputDevice *inputdev = (InputDevice *)filep->f_inode->i_private; + InputDevice *inputdev = (InputDevice *)((struct drv_data*)filep->f_vnode->data)->priv; if (inputdev == NULL) { HDF_LOGE("%s: filep is null", __func__); return HDF_FAILURE; @@ -64,7 +64,7 @@ static int32_t InputDevOpen(struct file *filep) static int32_t InputDevClose(struct file *filep) { - InputDevice *inputdev = (InputDevice *)filep->f_inode->i_private; + InputDevice *inputdev = (InputDevice *)((struct drv_data*)filep->f_vnode->data)->priv; if (inputdev == NULL) { HDF_LOGE("%s: inputdev is null", __func__); return HDF_FAILURE; @@ -76,7 +76,7 @@ static int32_t InputDevClose(struct file *filep) static int32_t InputDevPoll(struct file *filep, poll_table *wait) { uint32_t pollMask = 0; - InputDevice *inputdev = (InputDevice *)filep->f_inode->i_private; + InputDevice *inputdev = (InputDevice *)((struct drv_data*)filep->f_vnode->data)->priv; switch (inputdev->devType) { case INDEV_TYPE_TOUCH: pollMask = TouchPoll(filep, inputdev, wait); diff --git a/model/input/driver/hdf_touch.c b/model/input/driver/hdf_touch.c index 239c711d..edb8fcf3 100644 --- a/model/input/driver/hdf_touch.c +++ b/model/input/driver/hdf_touch.c @@ -104,7 +104,7 @@ int32_t TouchIoctl(InputDevice *inputdev, int32_t cmd, unsigned long arg) uint32_t TouchPoll(FAR struct file *filep, InputDevice *inputDev, poll_table *wait) { uint32_t pollMask = 0; - InputDevice *inputdev = (InputDevice *)filep->f_inode->i_private; + InputDevice *inputdev = (InputDevice *)((struct drv_data*)filep->f_vnode->data)->priv; if (inputdev == NULL) { HDF_LOGE("%s: inputdev is null", __func__); return pollMask;