Thread (21 messages) 21 messages, 8 authors, 2014-07-03

Re: [PATCH v2 2/6] input: touchscreen: imx25 tcq driver

From: Russell King - ARM Linux <hidden>
Date: 2014-06-29 11:49:01
Also in: linux-arm-kernel, linux-iio

On Sun, Jun 29, 2014 at 12:00:20PM +0100, Jonathan Cameron wrote:
On 21/06/14 20:55, Fabio Estevam wrote:
quoted
On Sat, Jun 21, 2014 at 7:18 AM, Jonathan Cameron [off-list ref] wrote:
quoted
quoted
+
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
Could this not in theory fail?
Yes, but devm_ioremap_resource will take care of it, so we don't need
to check for error here.
Nothing like counter intuitive behaviour.  Ah well.

Thanks for explaining this!
Maybe it would be better to have:

	mem = platform_ioremap_resource(pdev, IORESOURCE_MEM, 0);

which wraps up both the platform_get_resource() call with
devm_ioremap_resource() so driver writers don't have to be concerned
about this aspect?

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help