[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E8D7BFB.4070706@itdev.co.uk>
Date: Thu, 06 Oct 2011 10:59:23 +0100
From: Nick Dyer <nick.dyer@...ev.co.uk>
To: Daniel Kurtz <djkurtz@...omium.org>
CC: Joonyoung Shim <jy0922.shim@...sung.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Iiro Valkonen <iiro.valkonen@...el.com>,
Henrik Rydberg <rydberg@...omail.se>,
Yufeng Shen <miletus@...omium.org>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Input: atmel_mxt_ts - Use snprintf for sysfs attribute
show method
Hi Daniel-
Just to introduce myself, I'm working for Atmel in UK on the
atmel_mxt_ts driver.
Daniel Kurtz wrote:
> Sysfs attribute show methods are always passed a buffer of length
> PAGE_SIZE. To keep from overwriting this buffer and causing havoc,
> use snprintf() to guarantee we never write more than the buffer can
> hold.
>
> In addition, at least for my touchscreen, the number and size of
> objects was far too big to fit in a single 4K page. Therefore, this
> patch also trims some redundant framing text to leave more room for
> actual data.
Yes, I'd noticed this problem as well. I was planning to address it by
splitting up the file, but your patch looks like a good solution for now.
I've tested it successfully on several chips.
Acked-by: Nick Dyer <nick.dyer@...ev.co.uk>
--
Nick Dyer
Software Engineer, ITDev Ltd
Hardware and Software Development Consultancy
Email: nick.dyer@...ev.co.uk
Website: http://www.itdev.co.uk
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists