From 759e7d6df3e4da96573a0bf957383211314792ee Mon Sep 17 00:00:00 2001 From: Himangi Saraogi Date: Thu, 7 Aug 2014 17:43:28 +0530 Subject: [PATCH] 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-format-patch failed