| 1 | --- a/Embedded/src/CAN/can_main.c |
| 2 | +++ b/Embedded/src/CAN/can_main.c |
| 3 | @@ -72,6 +72,7 @@ |
| 4 | #include "can_main.h" |
| 5 | #include "can_ioctl.h" |
| 6 | #include <linux/fs.h> |
| 7 | +#include <linux/module.h> |
| 8 | |
| 9 | |
| 10 | MODULE_AUTHOR("Intel(R) Corporation"); |
| 11 | @@ -110,7 +111,7 @@ struct file_operations file_ops = { |
| 12 | .owner = THIS_MODULE, |
| 13 | .read = can_read, |
| 14 | .write = can_write, |
| 15 | - .ioctl = can_dev_io, |
| 16 | + .unlocked_ioctl = can_dev_io, |
| 17 | .open = can_open, |
| 18 | .release = can_release |
| 19 | }; |
| 20 | @@ -594,8 +595,7 @@ int icp_can_reset(can_os_t *can_os) |
| 21 | /***************************************************************************** |
| 22 | * Device IO control function. Used by user apps to configure CAN device. |
| 23 | *****************************************************************************/ |
| 24 | -int can_dev_io(struct inode *inode, struct file *filp, unsigned int cmd, |
| 25 | - unsigned long arg) |
| 26 | +long can_dev_io(struct file *filp, unsigned int cmd, unsigned long arg) |
| 27 | { |
| 28 | can_os_t *can_os; |
| 29 | unsigned int err=0; |
| 30 | --- a/Embedded/src/CAN/can_main.h |
| 31 | +++ b/Embedded/src/CAN/can_main.h |
| 32 | @@ -157,8 +157,7 @@ ssize_t can_write( |
| 33 | int icp_can_reset( |
| 34 | can_os_t *can_os); |
| 35 | |
| 36 | -int can_dev_io( |
| 37 | - struct inode *inode, |
| 38 | +long can_dev_io( |
| 39 | struct file *filp, |
| 40 | unsigned int cmd, |
| 41 | unsigned long arg); |
| 42 | |