From 42c168fb8fa9ac3e3109c6255138a794f250d458 Mon Sep 17 00:00:00 2001 From: wangchenyang Date: Mon, 1 Feb 2021 16:36:41 +0800 Subject: [PATCH] Description:vfs refactoring Feature or Bugfix:Feature Binary Source:Huawei PrivateCode(Yes/No):Yes Change-Id: I175d2648bc6f9078c34de2c0a5c93fda10b86c47 ChangeID:13306380 --- model/input/driver/hdf_input_device_manager.c | 8 ++++---- model/input/driver/hdf_touch.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/model/input/driver/hdf_input_device_manager.c b/model/input/driver/hdf_input_device_manager.c index 00bdbb285..f0b0b37a8 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 04daecad1..a78142bd9 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; -- Gitee