aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/input/touchscreen/atmel_mxt_ts.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-07-13 14:40:42 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-13 14:40:42 -0700
commit073c916bc00571d8662b89a294eba265481b6fbb (patch)
treeedc0238b56251dd056137323e7171d1452407516 /drivers/input/touchscreen/atmel_mxt_ts.c
parentMerge tag 'for-5.3/io_uring-20190711' of git://git.kernel.dk/linux-block (diff)
parentMerge branch 'next' into for-linus (diff)
downloadwireguard-linux-073c916bc00571d8662b89a294eba265481b6fbb.tar.xz
wireguard-linux-073c916bc00571d8662b89a294eba265481b6fbb.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov: - an update to Elan touchpad SMBus driver to fetch device parameters (size, resolution) while it is still in PS/2 mode, before switching over to SMBus, as in that mode some devices return garbage dimensions - update to iforce joystick driver - miscellaneous driver fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (48 commits) Input: gpio_keys_polled - allow specifying name of input device Input: edt-ft5x06 - simplify event reporting code Input: max77650-onkey - add MODULE_ALIAS() Input: atmel_mxt_ts - fix leak in mxt_update_cfg() Input: synaptics - enable SMBUS on T480 thinkpad trackpad Input: atmel_mxt_ts - fix -Wunused-const-variable Input: joydev - extend absolute mouse detection HID: quirks: Refactor ELAN 400 and 401 handling Input: elan_i2c - export the device id whitelist Input: edt-ft5x06 - use get_unaligned_be16() Input: iforce - add the Saitek R440 Force Wheel Input: iforce - use unaligned accessors, where appropriate Input: iforce - drop couple of temps from transport code Input: iforce - drop bus type from iforce structure Input: iforce - use DMA-safe buffores for USB transfers Input: iforce - allow callers supply data buffer when fetching device IDs Input: iforce - only call iforce_process_packet() if initialized Input: iforce - signal command completion from transport code Input: iforce - do not combine arguments for iforce_process_packet() Input: iforce - factor out hat handling when parsing packets ...
Diffstat (limited to 'drivers/input/touchscreen/atmel_mxt_ts.c')
-rw-r--r--drivers/input/touchscreen/atmel_mxt_ts.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 19378f200c63..4a5f482cf1af 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -256,16 +256,6 @@ enum v4l_dbg_inputs {
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 {
MXT_SUSPEND_DEEP_SLEEP = 0,
MXT_SUSPEND_T9_CTRL = 1,
@@ -1521,7 +1511,8 @@ static int mxt_update_cfg(struct mxt_data *data, const struct firmware *fw)
} else if (config_crc == data->config_crc) {
dev_dbg(dev, "Config CRC 0x%06X: OK\n",
data->config_crc);
- return 0;
+ ret = 0;
+ goto release_raw;
} else {
dev_info(dev, "Config CRC 0x%06X: does not match file 0x%06X\n",
data->config_crc, config_crc);
@@ -2218,6 +2209,16 @@ recheck:
}
#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,
unsigned int y)
{