summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHan Wang <416810799@qq.com>2022-03-19 08:17:00 +0100
committerLuK1337 <priv.luk@gmail.com>2024-02-19 12:53:46 +0100
commitb04baa6223d275019e028c83e815fccb6616b06e (patch)
treed20c203aebab1f86062bf21c530ce9dc98472762
parenta3591a235c89dbc2e0bc03533fb538f6d2aa883b (diff)
input: Drop INPUT_PROP_NO_DUMMY_RELEASE bit
* INPUT_PROP_NO_DUMMY_RELEASE definition in this kernel collides with INPUT_PROP_ACCELEROMETER definition in bionic and upstream kernel. As a result, Android recognizes normal input devices like accelerometers and causes strange behaviors. There are no references to this bit in userspace and it is not in 4.9+ kernels, so let's drop this CAF jank. Change-Id: Id9b4ec8d31470e663f533249c4bc4b9e94fd38be
-rw-r--r--drivers/input/input.c10
-rw-r--r--include/uapi/linux/input.h1
-rw-r--r--sound/soc/codecs/wcd-mbhc-v2.c3
-rw-r--r--sound/soc/codecs/wcd9xxx-mbhc.c3
4 files changed, 2 insertions, 15 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 857917086cb0..6d9f58a446fa 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -1673,14 +1673,8 @@ void input_reset_device(struct input_dev *dev)
mutex_lock(&dev->mutex);
spin_lock_irqsave(&dev->event_lock, flags);
- /*
- * Keys that have been pressed at suspend time are unlikely
- * to be still pressed when we resume.
- */
- if (!test_bit(INPUT_PROP_NO_DUMMY_RELEASE, dev->propbit)) {
- input_dev_toggle(dev, true);
- input_dev_release_keys(dev);
- }
+ input_dev_toggle(dev, true);
+ input_dev_release_keys(dev);
spin_unlock_irqrestore(&dev->event_lock, flags);
mutex_unlock(&dev->mutex);
diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h
index 7a89b7b62ab8..f6a44010e84a 100644
--- a/include/uapi/linux/input.h
+++ b/include/uapi/linux/input.h
@@ -181,7 +181,6 @@ struct input_mask {
#define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */
#define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */
#define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */
-#define INPUT_PROP_NO_DUMMY_RELEASE 0x06 /* no dummy event */
#define INPUT_PROP_MAX 0x1f
#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)
diff --git a/sound/soc/codecs/wcd-mbhc-v2.c b/sound/soc/codecs/wcd-mbhc-v2.c
index 997a623033fb..dd4e3533a015 100644
--- a/sound/soc/codecs/wcd-mbhc-v2.c
+++ b/sound/soc/codecs/wcd-mbhc-v2.c
@@ -2881,9 +2881,6 @@ int wcd_mbhc_init(struct wcd_mbhc *mbhc, struct snd_soc_codec *codec,
return ret;
}
- set_bit(INPUT_PROP_NO_DUMMY_RELEASE,
- mbhc->button_jack.jack->input_dev->propbit);
-
INIT_DELAYED_WORK(&mbhc->mbhc_firmware_dwork,
wcd_mbhc_fw_read);
INIT_DELAYED_WORK(&mbhc->mbhc_btn_dwork, wcd_btn_lpress_fn);
diff --git a/sound/soc/codecs/wcd9xxx-mbhc.c b/sound/soc/codecs/wcd9xxx-mbhc.c
index 2012e4617ee1..b6a50742f501 100644
--- a/sound/soc/codecs/wcd9xxx-mbhc.c
+++ b/sound/soc/codecs/wcd9xxx-mbhc.c
@@ -5503,9 +5503,6 @@ int wcd9xxx_mbhc_init(struct wcd9xxx_mbhc *mbhc, struct wcd9xxx_resmgr *resmgr,
return ret;
}
- set_bit(INPUT_PROP_NO_DUMMY_RELEASE,
- mbhc->button_jack.jack->input_dev->propbit);
-
INIT_DELAYED_WORK(&mbhc->mbhc_firmware_dwork,
wcd9xxx_mbhc_fw_read);
INIT_DELAYED_WORK(&mbhc->mbhc_btn_dwork, wcd9xxx_btn_lpress_fn);