summaryrefslogtreecommitdiff
path: root/drivers/mtd/maps/physmap_of_core.c
AgeCommit message (Collapse)Author
2019-11-24mtd: physmap_of: Release resources on errorRicardo Ribalda Delgado
[ Upstream commit ef0de747f7ad179c7698a5b0e28db05f18ecbf57 ] During probe, if there was an error the memory region and the memory map were not properly released.This can lead a system unusable if deferred probe is in use. Replace mem_request and map with devm_ioremap_resource Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2017-08-15mtd: physmap_of: Fix resources leak in 'of_flash_probe()'Christophe Jaillet
If 'of_flash_probe_gemini()' or 'of_flash_probe_versatile()' fail, we must reslease some resources, as already done in all error handling paths in this function. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
2017-08-15mtd: Convert to using %pOF instead of full_nameRob Herring
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring <robh@kernel.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Brian Norris <computersforpeace@gmail.com> Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Richard Weinberger <richard@nod.at> Cc: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr> Cc: linux-mtd@lists.infradead.org Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
2017-04-19mtd: physmap_of: use OF helpers for reading stringsRafał Miłecki
OF core code provides helpers for counting strings and reading them so use them instead of doing this manually. This simplifies the code a bit. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2017-04-19mtd: physmap_of: really fix the physmap add-onsLinus Walleij
The current way of building the of_physmap add-ons result in just the add-on being in the object code, and not the actual core implementation and regress the Gemini and Versatile. Bake the physmap_of.o object by baking physmap_of_core.o and adding the Versatile and/or Gemini add-ons to the final object. Rename the source file physmap_of_core.c to get the desired build components. Suggested-by: Boris Brezillon <boris.brezillon@free-electrons.com> Fixes: 4f04f68e1598 ("mtd: physmap_of: fixup gemini/versatile dependencies") Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>