Skip to contentSkip to conversation

Input: synaptics-rmi4: use device managed memory for the data packet buffer

PATCH In review Andrew Duggan 2 participants 2 messages Nov 5, 2015 – Nov 9, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 24/26 Input: synaptics-rmi4: use device managed memory for the data packet buffer

The data packet should use device managed memory since the buffer is retained until the device goes away.

---
 drivers/input/rmi4/rmi_f11.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/input/rmi4/rmi_f11.c +2 -1
index ee4b155..10a0c11 100644
@@ -683,7 +683,8 @@ static int f11_2d_construct_data(struct f11_data *f11)
 		sensor->pkt_size +=
 			DIV_ROUND_UP(query->nr_touch_shapes + 1, 8);
 
-	sensor->data_pkt = kzalloc(sensor->pkt_size, GFP_KERNEL);
+	sensor->data_pkt = devm_kzalloc(&sensor->fn->dev, sensor->pkt_size,
+					GFP_KERNEL);
 	if (!sensor->data_pkt)
 		return -ENOMEM;
 
Signature · 1 line
2.1.4