Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1263625 > unrolled thread

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

Started byAndrew Duggan <aduggan@synaptics.com>
First post2015-11-06 00:50 +0100
Last post2015-11-09 14:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 24/26] Input: synaptics-rmi4: use device managed memory for the data packet buffer Andrew Duggan <aduggan@synaptics.com> - 2015-11-06 00:50 +0100
    Re: [PATCH 24/26] Input: synaptics-rmi4: use device managed memory  for the data packet buffer Linus Walleij <linus.walleij@linaro.org> - 2015-11-09 14:40 +0100

#1263625 — [PATCH 24/26] Input: synaptics-rmi4: use device managed memory for the data packet buffer

FromAndrew Duggan <aduggan@synaptics.com>
Date2015-11-06 00:50 +0100
Subject[PATCH 24/26] Input: synaptics-rmi4: use device managed memory for the data packet buffer
Message-ID<qrCs2-5az-19@gated-at.bofh.it>
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1265665 — Re: [PATCH 24/26] Input: synaptics-rmi4: use device managed memory for the data packet buffer

FromLinus Walleij <linus.walleij@linaro.org>
Date2015-11-09 14:40 +0100
SubjectRe: [PATCH 24/26] Input: synaptics-rmi4: use device managed memory for the data packet buffer
Message-ID<qsUPU-70f-3@gated-at.bofh.it>
In reply to#1263625
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web