From: Himangi Saraogi Date: Thu, 7 Aug 2014 12:13:28 +0000 (+0530) Subject: pcie-gadget-spear: use devm_ functions X-Git-Tag: fixes-for-v3.18-merge-window~11^2~49 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=759e7d6df3e4da96573a0bf957383211314792ee;p=pandora-kernel.git 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 Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed