]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvneta: use devm_ioremap_resource() instead of of_iomap()
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 25 Mar 2014 23:26:55 +0000 (00:26 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Mar 2014 20:52:42 +0000 (16:52 -0400)
commit2fc935723dc01af87c003667bc908061dc38fd99
treeb2acdc5f918c94602776b1ad3cd05d075b625096
parentcb4d04c580d411f94195f27209555a4251b9c80f
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