Commit 5cecc2bc authored by Nathan Huckleberry's avatar Nathan Huckleberry Committed by Dmitry Torokhov

Input: atmel_mxt_ts - fix -Wunused-const-variable

Clang produces the following warning

drivers/input/touchscreen/atmel_mxt_ts.c:259:42: warning: unused
variable 'mxt_video_fops' [-Wunused-const-variable]
static const struct v4l2_file_operations mxt_video_fops = {

Since mxt_video_fops is only used inside an ifdef. It should
be moved inside the ifdef.

Link: https://github.com/ClangBuiltLinux/linux/issues/527Signed-off-by: default avatarNathan Huckleberry <nhuck@google.com>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 8d3c60c7
...@@ -261,16 +261,6 @@ enum v4l_dbg_inputs { ...@@ -261,16 +261,6 @@ enum v4l_dbg_inputs {
MXT_V4L_INPUT_MAX, MXT_V4L_INPUT_MAX,
}; };
static const struct v4l2_file_operations mxt_video_fops = {
.owner = THIS_MODULE,
.open = v4l2_fh_open,
.release = vb2_fop_release,
.unlocked_ioctl = video_ioctl2,
.read = vb2_fop_read,
.mmap = vb2_fop_mmap,
.poll = vb2_fop_poll,
};
enum mxt_suspend_mode { enum mxt_suspend_mode {
MXT_SUSPEND_DEEP_SLEEP = 0, MXT_SUSPEND_DEEP_SLEEP = 0,
MXT_SUSPEND_T9_CTRL = 1, MXT_SUSPEND_T9_CTRL = 1,
...@@ -2223,6 +2213,16 @@ static int mxt_init_t7_power_cfg(struct mxt_data *data) ...@@ -2223,6 +2213,16 @@ static int mxt_init_t7_power_cfg(struct mxt_data *data)
} }
#ifdef CONFIG_TOUCHSCREEN_ATMEL_MXT_T37 #ifdef CONFIG_TOUCHSCREEN_ATMEL_MXT_T37
static const struct v4l2_file_operations mxt_video_fops = {
.owner = THIS_MODULE,
.open = v4l2_fh_open,
.release = vb2_fop_release,
.unlocked_ioctl = video_ioctl2,
.read = vb2_fop_read,
.mmap = vb2_fop_mmap,
.poll = vb2_fop_poll,
};
static u16 mxt_get_debug_value(struct mxt_data *data, unsigned int x, static u16 mxt_get_debug_value(struct mxt_data *data, unsigned int x,
unsigned int y) unsigned int y)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment