linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 24/26] Input: synaptics-rmi4: use device managed memory for the data packet buffer
@ 2015-11-05 23:42 Andrew Duggan
  2015-11-09 13:35 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Duggan @ 2015-11-05 23:42 UTC (permalink / raw)
  To: linux-input, linux-kernel
  Cc: Andrew Duggan, Dmitry Torokhov, Linus Walleij, Benjamin Tissoires,
	Christopher Heiny, Stephen Chandler Paul

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

Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
---
 drivers/input/rmi4/rmi_f11.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/input/rmi4/rmi_f11.c b/drivers/input/rmi4/rmi_f11.c
index ee4b155..10a0c11 100644
--- a/drivers/input/rmi4/rmi_f11.c
+++ b/drivers/input/rmi4/rmi_f11.c
@@ -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;
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 24/26] Input: synaptics-rmi4: use device managed memory for the data packet buffer
  2015-11-05 23:42 [PATCH 24/26] Input: synaptics-rmi4: use device managed memory for the data packet buffer Andrew Duggan
@ 2015-11-09 13:35 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2015-11-09 13:35 UTC (permalink / raw)
  To: Andrew Duggan
  Cc: Linux Input, linux-kernel@vger.kernel.org, Dmitry Torokhov,
	Benjamin Tissoires, Christopher Heiny, Stephen Chandler Paul

On Fri, Nov 6, 2015 at 12:42 AM, Andrew Duggan <aduggan@synaptics.com> wrote:

> The data packet should use device managed memory since the buffer is
> retained until the device goes away.
>
> Signed-off-by: Andrew Duggan <aduggan@synaptics.com>

Squash into F11 patch.

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-09 13:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-05 23:42 [PATCH 24/26] Input: synaptics-rmi4: use device managed memory for the data packet buffer Andrew Duggan
2015-11-09 13:35 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).