From cfcaa72913c5295962dfd9cd3b20f3736dc3fa8d Mon Sep 17 00:00:00 2001 From: Anuj Gangwar Date: Tue, 5 Mar 2019 12:21:21 +0530 Subject: 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 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 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/misc/saf775x/compat_saf775x_ioctl.c | 6 ++- drivers/misc/saf775x/compat_saf775x_ioctl.h | 69 ----------------------------- drivers/misc/saf775x/saf775x_ioctl.c | 7 ++- include/uapi/misc/compat_saf775x_ioctl.h | 67 ++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+), 73 deletions(-) delete mode 100644 drivers/misc/saf775x/compat_saf775x_ioctl.h create mode 100644 include/uapi/misc/compat_saf775x_ioctl.h 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 @@ /* * compat_saf775x_ioctl.c -- SAF775X Soc Audio driver IO control * - * Copyright (c) 2017 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-2019 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -18,7 +18,9 @@ #include "saf775x_ioctl.h" -#include "compat_saf775x_ioctl.h" +#include +#include +#include static int compat_get_saf775x_cmd( 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 @@ - /* - * compat_saf775x_ioctl.h -- SAF775X Soc Audio driver IO control - * - * Copyright (c) 2017 NVIDIA CORPORATION. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHIN - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef __COMPAT_SAF775X_IOCTL_H__ -#define __COMPAT_SAF775X_IOCTL_H__ - -#include - -struct compat_saf775x_cmd { - compat_uint_t reg; - compat_uint_t reg_len; - compat_ulong_t val; - compat_uint_t val_len; -}; - -struct compat_saf775x_control_param { - char name[20]; - compat_uint_t reg; - compat_uint_t num_reg; - compat_int_t val; -}; - -struct compat_saf775x_control_info { - char name[20]; - compat_int_t min; - compat_int_t max; - compat_int_t step; - compat_int_t val; -}; - -enum { - SAF775X_CONTROL_SET_IOCTL_32 = _IOW(0xF4, 0x01, - struct compat_saf775x_cmd), - SAF775x_CODEC_RESET_IOCTL_32 = _IO(0xF4, 0x02), - SAF775X_CONTROL_GET_IOCTL_32 = _IOR(0xF4, 0x03, - struct compat_saf775x_cmd), - SAF775X_CONTROL_GET_MIXER_32 = _IOR(0xF4, 0x04, - struct compat_saf775x_control_info), - SAF775X_CONTROL_SET_MIXER_32 = _IOW(0xF4, 0x05, - struct compat_saf775x_control_param), - SAF775X_CONTROL_SETIF_32 = _IOW(0xF4, 0x6, compat_uint_t), - SAF775X_CONTROL_GETIF_32 = _IO(0xF4, 0x7), - SAF775X_CONTROL_KEYCODE_32 = _IOW(0xF4, 0x8, - struct compat_saf775x_cmd), -}; - -#if IS_ENABLED(CONFIG_COMPAT) - long compat_saf775x_hwdep_ioctl(struct file *file, - unsigned int cmd, unsigned long arg); -#else - #define compat_saf775x_hwdep_ioctl NULL -#endif /* CONFIG_COMPAT */ - -#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 @@ /* * saf775x_ioctl.c -- SAF775X Soc Audio driver IO control * - * Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2019 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -15,11 +15,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ +#include +#include #include #include #include +#include +#include #include "saf775x_ioctl.h" -#include "compat_saf775x_ioctl.h" #define MAX_LEN 24 #define CHECK_MAX_AND_ADJUST(__val_len__)\ diff --git a/include/uapi/misc/compat_saf775x_ioctl.h b/include/uapi/misc/compat_saf775x_ioctl.h new file mode 100644 index 000000000..a5ad8a70d --- /dev/null +++ b/include/uapi/misc/compat_saf775x_ioctl.h @@ -0,0 +1,67 @@ + /* + * compat_saf775x_ioctl.h -- SAF775X Soc Audio driver IO control + * + * Copyright (c) 2017-2019 NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHIN + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef __UAPI_COMPAT_SAF775X_IOCTL_H__ +#define __UAPI_COMPAT_SAF775X_IOCTL_H__ + +struct compat_saf775x_cmd { + compat_uint_t reg; + compat_uint_t reg_len; + compat_ulong_t val; + compat_uint_t val_len; +}; + +struct compat_saf775x_control_param { + char name[20]; + compat_uint_t reg; + compat_uint_t num_reg; + compat_int_t val; +}; + +struct compat_saf775x_control_info { + char name[20]; + compat_int_t min; + compat_int_t max; + compat_int_t step; + compat_int_t val; +}; + +enum { + SAF775X_CONTROL_SET_IOCTL_32 = _IOW(0xF4, 0x01, + struct compat_saf775x_cmd), + SAF775x_CODEC_RESET_IOCTL_32 = _IO(0xF4, 0x02), + SAF775X_CONTROL_GET_IOCTL_32 = _IOR(0xF4, 0x03, + struct compat_saf775x_cmd), + SAF775X_CONTROL_GET_MIXER_32 = _IOR(0xF4, 0x04, + struct compat_saf775x_control_info), + SAF775X_CONTROL_SET_MIXER_32 = _IOW(0xF4, 0x05, + struct compat_saf775x_control_param), + SAF775X_CONTROL_SETIF_32 = _IOW(0xF4, 0x6, compat_uint_t), + SAF775X_CONTROL_GETIF_32 = _IO(0xF4, 0x7), + SAF775X_CONTROL_KEYCODE_32 = _IOW(0xF4, 0x8, + struct compat_saf775x_cmd), +}; + +#if IS_ENABLED(CONFIG_COMPAT) + long compat_saf775x_hwdep_ioctl(struct file *file, + unsigned int cmd, unsigned long arg); +#else + #define compat_saf775x_hwdep_ioctl NULL +#endif /* CONFIG_COMPAT */ + +#endif /* __UAPI_COMPAT_SAF775X_IOCTL_H__ */ -- cgit v1.2.2