]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/misc/spear13xx_pcie_gadget.c
pcie-gadget-spear: use devm_ functions
authorHimangi Saraogi <himangi774@gmail.com>
Thu, 7 Aug 2014 12:13:28 +0000 (17:43 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Sep 2014 06:04:17 +0000 (23:04 -0700)
commit759e7d6df3e4da96573a0bf957383211314792ee
tree0338d6da70b702455a3caea45513a603ddea9d45
parent322d3f6a58e479d27b86deb6024148669d6a2fa1
pcie-gadget-spear: use devm_ functions

The various devm_ functions allocate memory that is released when a
driver detaches. This patch uses these functions for data that is
allocated in the probe function of a platform device and is only freed
in the remove function. Also, the unnecessary labels are removed and
linux/device.h is added to make sure the devm_*() routine declarations
are unambiguously available.

The initial call to platform_get_resource is moved down to the
introduced call to devm_ioremap_resource that uses its result.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/spear13xx_pcie_gadget.c