lynkco: add 32-bit ioctl for tcmd
details: add 32-bit ioctl for tcmd Change-Id: If5c5df1432a44916989a1b2e93aa774a8f36a66b Signed-off-by: liuzy55 <liuzy55@motorola.com> Reviewed-on: https://gerrit.mot.com/2517655 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Pengfei Qiao <qiaopf1@motorola.com> Reviewed-by: Wang Liu <liuwang2@lenovo.com> Reviewed-by: <wangdp11@motorola.com> Reviewed-by: LiuZhuo <liuzhuo3@motorola.com> Reviewed-by: Zhichao Chen <chenzc2@motorola.com> Reviewed-by: Zhenxin Xi <xizx@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
1 parent
d4d13c7043
commit
4a38966a6c
1 file changed
+19
-1
@@ -147,7 +147,9 @@ static int stmvl53l1_open(struct inode *inode, struct file *file);
|
||||
static int stmvl53l1_release(struct inode *inode, struct file *file);
|
||||
static int ctrl_start(struct stmvl53l1_data *data);
|
||||
static int ctrl_stop(struct stmvl53l1_data *data);
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
static long stmvl53l1_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
|
||||
#endif
|
||||
|
||||
static bool force_device_on_en_default = true;
|
||||
|
||||
@@ -307,6 +309,9 @@ struct stmvl53l1_data *stmvl53l1_dev_table[STMVL53L1_CFG_MAX_DEV];
|
||||
static const struct file_operations stmvl53l1_ranging_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.unlocked_ioctl = stmvl53l1_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl = stmvl53l1_compat_ioctl,
|
||||
#endif
|
||||
.open = stmvl53l1_open,
|
||||
.release = stmvl53l1_release,
|
||||
};
|
||||
@@ -4394,6 +4399,19 @@ void stmvl53l1_pm_suspend_stop(struct stmvl53l1_data *data)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
static long stmvl53l1_compat_ioctl(struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
int ret;
|
||||
struct stmvl53l1_data *data =
|
||||
container_of(file->private_data,
|
||||
struct stmvl53l1_data, miscdev);
|
||||
ret = stmvl53l1_ioctl_handler(data, cmd, arg, compat_ptr(arg));
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static long stmvl53l1_ioctl(struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user