]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvneta: use devm_ioremap_resource() instead of of_iomap()
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 27 Mar 2014 10:39:29 +0000 (11:39 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Mar 2014 19:31:33 +0000 (15:31 -0400)
commitd53807649bc0d92ad522064c65cd0f5fe7372d72
tree5c5f032bebb956475aa21fabf138da46f66c390b
parent5bb83df363f2aecb39c9bf586b1b165f6e84c4bf
net: mvneta: use devm_ioremap_resource() instead of of_iomap()

The mvneta driver currently uses of_iomap(), which has two drawbacks:
it doesn't request the resource, and it isn't devm-style so some error
handling is needed.

This commit switches to use devm_ioremap_resource() instead, which
automatically requests the resource (so the I/O registers region shows
up properly in /proc/iomem), and also is devm-style, which allows to
get rid of some error handling to unmap the I/O registers region.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c