diff --git a/model/input/driver/hdf_input_device_manager.c b/model/input/driver/hdf_input_device_manager.c index 00bdbb2855489b1dba47cb795090529461441d55..f0b0b37a82e5eb10577762f2372ae4533e80125f 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 04daecad186441af5eb68653c2ef2a41e3fa1949..a78142bd90266d9366095fac647f51b14d8640a5 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;