diff options
| author | Anuj Gangwar <anujg@nvidia.com> | 2019-03-05 01:51:21 -0500 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2019-05-06 11:28:40 -0400 |
| commit | cfcaa72913c5295962dfd9cd3b20f3736dc3fa8d (patch) | |
| tree | 6a9031868e6f7c677762d5faf39bdcb62802856a /drivers/misc | |
| parent | 8668379cc2d0dde1f97603f1b3dda4117f41cae5 (diff) | |
include: uapi: move compat_saf775x_ioctl.h file
Move compat_saf775x_ioctl header file from drivers/misc/saf775x/ to
include/uapi/misc/.
Change the path for header in dependent c files.
Bug 2062672
Change-Id: I959d16b8b56214cf2db83c05f181faf1def2a1e1
Signed-off-by: Anuj Gangwar <anujg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2032464
(cherry picked from commit 07d3aa875210c2f833a60afa5fb5c546a33d29d7)
Reviewed-on: https://git-master.nvidia.com/r/2109958
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/misc')
| -rw-r--r-- | drivers/misc/saf775x/compat_saf775x_ioctl.c | 6 | ||||
| -rw-r--r-- | drivers/misc/saf775x/compat_saf775x_ioctl.h | 69 | ||||
| -rw-r--r-- | drivers/misc/saf775x/saf775x_ioctl.c | 7 |
3 files changed, 9 insertions, 73 deletions
diff --git a/drivers/misc/saf775x/compat_saf775x_ioctl.c b/drivers/misc/saf775x/compat_saf775x_ioctl.c index a53f642b8..de89dde99 100644 --- a/drivers/misc/saf775x/compat_saf775x_ioctl.c +++ b/drivers/misc/saf775x/compat_saf775x_ioctl.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * compat_saf775x_ioctl.c -- SAF775X Soc Audio driver IO control | 2 | * compat_saf775x_ioctl.c -- SAF775X Soc Audio driver IO control |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2017 NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2017-2019 NVIDIA CORPORATION. All rights reserved. |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
| @@ -18,7 +18,9 @@ | |||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | #include "saf775x_ioctl.h" | 20 | #include "saf775x_ioctl.h" |
| 21 | #include "compat_saf775x_ioctl.h" | 21 | #include <uapi/misc/compat_saf775x_ioctl.h> |
| 22 | #include <linux/uaccess.h> | ||
| 23 | #include <linux/compat.h> | ||
| 22 | 24 | ||
| 23 | static int compat_get_saf775x_cmd( | 25 | static int compat_get_saf775x_cmd( |
| 24 | struct compat_saf775x_cmd __user *data32, | 26 | struct compat_saf775x_cmd __user *data32, |
diff --git a/drivers/misc/saf775x/compat_saf775x_ioctl.h b/drivers/misc/saf775x/compat_saf775x_ioctl.h deleted file mode 100644 index 9ad4e7a23..000000000 --- a/drivers/misc/saf775x/compat_saf775x_ioctl.h +++ /dev/null | |||
| @@ -1,69 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * compat_saf775x_ioctl.h -- SAF775X Soc Audio driver IO control | ||
| 3 | * | ||
| 4 | * Copyright (c) 2017 NVIDIA CORPORATION. All rights reserved. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify it | ||
| 7 | * under the terms and conditions of the GNU General Public License, | ||
| 8 | * version 2, as published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope it will be useful, but WITHIN | ||
| 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 13 | * more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef __COMPAT_SAF775X_IOCTL_H__ | ||
| 20 | #define __COMPAT_SAF775X_IOCTL_H__ | ||
| 21 | |||
| 22 | #include <linux/compat.h> | ||
| 23 | |||
| 24 | struct compat_saf775x_cmd { | ||
| 25 | compat_uint_t reg; | ||
| 26 | compat_uint_t reg_len; | ||
| 27 | compat_ulong_t val; | ||
| 28 | compat_uint_t val_len; | ||
| 29 | }; | ||
| 30 | |||
| 31 | struct compat_saf775x_control_param { | ||
| 32 | char name[20]; | ||
| 33 | compat_uint_t reg; | ||
| 34 | compat_uint_t num_reg; | ||
| 35 | compat_int_t val; | ||
| 36 | }; | ||
| 37 | |||
| 38 | struct compat_saf775x_control_info { | ||
| 39 | char name[20]; | ||
| 40 | compat_int_t min; | ||
| 41 | compat_int_t max; | ||
| 42 | compat_int_t step; | ||
| 43 | compat_int_t val; | ||
| 44 | }; | ||
| 45 | |||
| 46 | enum { | ||
| 47 | SAF775X_CONTROL_SET_IOCTL_32 = _IOW(0xF4, 0x01, | ||
| 48 | struct compat_saf775x_cmd), | ||
| 49 | SAF775x_CODEC_RESET_IOCTL_32 = _IO(0xF4, 0x02), | ||
| 50 | SAF775X_CONTROL_GET_IOCTL_32 = _IOR(0xF4, 0x03, | ||
| 51 | struct compat_saf775x_cmd), | ||
| 52 | SAF775X_CONTROL_GET_MIXER_32 = _IOR(0xF4, 0x04, | ||
| 53 | struct compat_saf775x_control_info), | ||
| 54 | SAF775X_CONTROL_SET_MIXER_32 = _IOW(0xF4, 0x05, | ||
| 55 | struct compat_saf775x_control_param), | ||
| 56 | SAF775X_CONTROL_SETIF_32 = _IOW(0xF4, 0x6, compat_uint_t), | ||
| 57 | SAF775X_CONTROL_GETIF_32 = _IO(0xF4, 0x7), | ||
| 58 | SAF775X_CONTROL_KEYCODE_32 = _IOW(0xF4, 0x8, | ||
| 59 | struct compat_saf775x_cmd), | ||
| 60 | }; | ||
| 61 | |||
| 62 | #if IS_ENABLED(CONFIG_COMPAT) | ||
| 63 | long compat_saf775x_hwdep_ioctl(struct file *file, | ||
| 64 | unsigned int cmd, unsigned long arg); | ||
| 65 | #else | ||
| 66 | #define compat_saf775x_hwdep_ioctl NULL | ||
| 67 | #endif /* CONFIG_COMPAT */ | ||
| 68 | |||
| 69 | #endif /* __COMPAT_SAF775X_IOCTL_H__ */ | ||
diff --git a/drivers/misc/saf775x/saf775x_ioctl.c b/drivers/misc/saf775x/saf775x_ioctl.c index 570640c9f..df0f51d7e 100644 --- a/drivers/misc/saf775x/saf775x_ioctl.c +++ b/drivers/misc/saf775x/saf775x_ioctl.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * saf775x_ioctl.c -- SAF775X Soc Audio driver IO control | 2 | * saf775x_ioctl.c -- SAF775X Soc Audio driver IO control |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2014-2019 NVIDIA CORPORATION. All rights reserved. |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
| @@ -15,11 +15,14 @@ | |||
| 15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ | 17 | */ |
| 18 | #include <linux/cdev.h> | ||
| 19 | #include <linux/i2c.h> | ||
| 18 | #include <linux/module.h> | 20 | #include <linux/module.h> |
| 19 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
| 20 | #include <linux/types.h> | 22 | #include <linux/types.h> |
| 23 | #include <linux/uaccess.h> | ||
| 24 | #include <uapi/misc/compat_saf775x_ioctl.h> | ||
| 21 | #include "saf775x_ioctl.h" | 25 | #include "saf775x_ioctl.h" |
| 22 | #include "compat_saf775x_ioctl.h" | ||
| 23 | 26 | ||
| 24 | #define MAX_LEN 24 | 27 | #define MAX_LEN 24 |
| 25 | #define CHECK_MAX_AND_ADJUST(__val_len__)\ | 28 | #define CHECK_MAX_AND_ADJUST(__val_len__)\ |
