Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 672bb0fa authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull input fixes from Dmitry Torokhov:

 - a fix for use-after-free in Synaptics RMI4 driver

 - correction to multitouch contact tracking on certain ALPS touchpads
   (which got broken when we tried to fix the 2-finger scrolling)

 - touchpad on Lenovo T640p is switched over to SMbus/RMI

 - a few device node refcount fixes

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: synaptics-rmi4 - prevent UAF reported by KASAN
  Input: ALPS - fix multi-touch decoding on SS4 plus touchpads
  Input: synaptics - Lenovo Thinkpad T460p devices should use RMI
  Input: of_touchscreen - add MODULE_LICENSE
  Input: 88pm860x-ts - fix child-node lookup
  Input: twl6040-vibra - fix child-node lookup
  Input: twl4030-vibra - fix sibling-node lookup
parents 9bdbaeba 55edde9f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -178,12 +178,14 @@ static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops,
			 twl4030_vibra_suspend, twl4030_vibra_resume);

static bool twl4030_vibra_check_coexist(struct twl4030_vibra_data *pdata,
			      struct device_node *node)
			      struct device_node *parent)
{
	struct device_node *node;

	if (pdata && pdata->coexist)
		return true;

	node = of_find_node_by_name(node, "codec");
	node = of_get_child_by_name(parent, "codec");
	if (node) {
		of_node_put(node);
		return true;
+1 −2
Original line number Diff line number Diff line
@@ -248,8 +248,7 @@ static int twl6040_vibra_probe(struct platform_device *pdev)
	int vddvibr_uV = 0;
	int error;

	of_node_get(twl6040_core_dev->of_node);
	twl6040_core_node = of_find_node_by_name(twl6040_core_dev->of_node,
	twl6040_core_node = of_get_child_by_name(twl6040_core_dev->of_node,
						 "vibra");
	if (!twl6040_core_node) {
		dev_err(&pdev->dev, "parent of node is missing?\n");
+13 −10
Original line number Diff line number Diff line
@@ -1250,29 +1250,32 @@ static int alps_decode_ss4_v2(struct alps_fields *f,
	case SS4_PACKET_ID_MULTI:
		if (priv->flags & ALPS_BUTTONPAD) {
			if (IS_SS4PLUS_DEV(priv->dev_id)) {
				f->mt[0].x = SS4_PLUS_BTL_MF_X_V2(p, 0);
				f->mt[1].x = SS4_PLUS_BTL_MF_X_V2(p, 1);
				f->mt[2].x = SS4_PLUS_BTL_MF_X_V2(p, 0);
				f->mt[3].x = SS4_PLUS_BTL_MF_X_V2(p, 1);
				no_data_x = SS4_PLUS_MFPACKET_NO_AX_BL;
			} else {
				f->mt[2].x = SS4_BTL_MF_X_V2(p, 0);
				f->mt[3].x = SS4_BTL_MF_X_V2(p, 1);
				no_data_x = SS4_MFPACKET_NO_AX_BL;
			}
			no_data_y = SS4_MFPACKET_NO_AY_BL;

			f->mt[2].y = SS4_BTL_MF_Y_V2(p, 0);
			f->mt[3].y = SS4_BTL_MF_Y_V2(p, 1);
			no_data_x = SS4_MFPACKET_NO_AX_BL;
			no_data_y = SS4_MFPACKET_NO_AY_BL;
		} else {
			if (IS_SS4PLUS_DEV(priv->dev_id)) {
				f->mt[0].x = SS4_PLUS_STD_MF_X_V2(p, 0);
				f->mt[1].x = SS4_PLUS_STD_MF_X_V2(p, 1);
				f->mt[2].x = SS4_PLUS_STD_MF_X_V2(p, 0);
				f->mt[3].x = SS4_PLUS_STD_MF_X_V2(p, 1);
				no_data_x = SS4_PLUS_MFPACKET_NO_AX;
			} else {
				f->mt[0].x = SS4_STD_MF_X_V2(p, 0);
				f->mt[1].x = SS4_STD_MF_X_V2(p, 1);
				f->mt[2].x = SS4_STD_MF_X_V2(p, 0);
				f->mt[3].x = SS4_STD_MF_X_V2(p, 1);
				no_data_x = SS4_MFPACKET_NO_AX;
			}
			no_data_y = SS4_MFPACKET_NO_AY;

			f->mt[2].y = SS4_STD_MF_Y_V2(p, 0);
			f->mt[3].y = SS4_STD_MF_Y_V2(p, 1);
			no_data_x = SS4_MFPACKET_NO_AX;
			no_data_y = SS4_MFPACKET_NO_AY;
		}

		f->first_mp = 0;
+6 −4
Original line number Diff line number Diff line
@@ -143,8 +143,10 @@ enum SS4_PACKET_ID {

#define SS4_MFPACKET_NO_AX		8160	/* X-Coordinate value */
#define SS4_MFPACKET_NO_AY		4080	/* Y-Coordinate value */
#define SS4_MFPACKET_NO_AX_BL	8176	/* Buttonless X-Coordinate value */
#define SS4_MFPACKET_NO_AY_BL	4088	/* Buttonless Y-Coordinate value */
#define SS4_MFPACKET_NO_AX_BL		8176	/* Buttonless X-Coord value */
#define SS4_MFPACKET_NO_AY_BL		4088	/* Buttonless Y-Coord value */
#define SS4_PLUS_MFPACKET_NO_AX		4080	/* SS4 PLUS, X */
#define SS4_PLUS_MFPACKET_NO_AX_BL	4088	/* Buttonless SS4 PLUS, X */

/*
 * enum V7_PACKET_ID - defines the packet type for V7
+1 −0
Original line number Diff line number Diff line
@@ -173,6 +173,7 @@ static const char * const smbus_pnp_ids[] = {
	"LEN0046", /* X250 */
	"LEN004a", /* W541 */
	"LEN200f", /* T450s */
	"LEN2018", /* T460p */
	NULL
};

Loading