Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

genalloc: rename dev_get_gen_pool() to gen_pool_get()

To be consistent with other genalloc interface namings, rename
dev_get_gen_pool() to gen_pool_get(). The original omitted "dev_" prefix
is removed, since it points to argument type of the function, and so it
does not bring any useful information.

[akpm@linux-foundation.org: update arch/arm/mach-socfpga/pm.c]
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Mark Brown <broonie@kernel.org>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Alan Tull <atull@opensource.altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Kevin Hilman <khilman@linaro.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Vladimir Zapolskiy and committed by
Linus Torvalds
0030edf2 c1bd55f9

+10 -10
+1 -1
arch/arm/mach-at91/pm.c
··· 369 369 return; 370 370 } 371 371 372 - sram_pool = dev_get_gen_pool(&pdev->dev); 372 + sram_pool = gen_pool_get(&pdev->dev); 373 373 if (!sram_pool) { 374 374 pr_warn("%s: sram pool unavailable!\n", __func__); 375 375 return;
+1 -1
arch/arm/mach-imx/pm-imx5.c
··· 297 297 goto put_node; 298 298 } 299 299 300 - ocram_pool = dev_get_gen_pool(&pdev->dev); 300 + ocram_pool = gen_pool_get(&pdev->dev); 301 301 if (!ocram_pool) { 302 302 pr_warn("%s: ocram pool unavailable!\n", __func__); 303 303 ret = -ENODEV;
+1 -1
arch/arm/mach-imx/pm-imx6.c
··· 451 451 goto put_node; 452 452 } 453 453 454 - ocram_pool = dev_get_gen_pool(&pdev->dev); 454 + ocram_pool = gen_pool_get(&pdev->dev); 455 455 if (!ocram_pool) { 456 456 pr_warn("%s: ocram pool unavailable!\n", __func__); 457 457 ret = -ENODEV;
+1 -1
arch/arm/mach-socfpga/pm.c
··· 56 56 goto put_node; 57 57 } 58 58 59 - ocram_pool = dev_get_gen_pool(&pdev->dev); 59 + ocram_pool = gen_pool_get(&pdev->dev); 60 60 if (!ocram_pool) { 61 61 pr_warn("%s: ocram pool unavailable!\n", __func__); 62 62 ret = -ENODEV;
+1 -1
drivers/media/platform/coda/coda-common.c
··· 2157 2157 /* Get IRAM pool from device tree or platform data */ 2158 2158 pool = of_get_named_gen_pool(np, "iram", 0); 2159 2159 if (!pool && pdata) 2160 - pool = dev_get_gen_pool(pdata->iram_dev); 2160 + pool = gen_pool_get(pdata->iram_dev); 2161 2161 if (!pool) { 2162 2162 dev_err(&pdev->dev, "iram pool not available\n"); 2163 2163 return -ENOMEM;
+1 -1
include/linux/genalloc.h
··· 119 119 120 120 extern struct gen_pool *devm_gen_pool_create(struct device *dev, 121 121 int min_alloc_order, int nid); 122 - extern struct gen_pool *dev_get_gen_pool(struct device *dev); 122 + extern struct gen_pool *gen_pool_get(struct device *dev); 123 123 124 124 bool addr_in_gen_pool(struct gen_pool *pool, unsigned long start, 125 125 size_t size);
+4 -4
lib/genalloc.c
··· 602 602 EXPORT_SYMBOL(devm_gen_pool_create); 603 603 604 604 /** 605 - * dev_get_gen_pool - Obtain the gen_pool (if any) for a device 605 + * gen_pool_get - Obtain the gen_pool (if any) for a device 606 606 * @dev: device to retrieve the gen_pool from 607 607 * 608 608 * Returns the gen_pool for the device if one is present, or NULL. 609 609 */ 610 - struct gen_pool *dev_get_gen_pool(struct device *dev) 610 + struct gen_pool *gen_pool_get(struct device *dev) 611 611 { 612 612 struct gen_pool **p = devres_find(dev, devm_gen_pool_release, NULL, 613 613 NULL); ··· 616 616 return NULL; 617 617 return *p; 618 618 } 619 - EXPORT_SYMBOL_GPL(dev_get_gen_pool); 619 + EXPORT_SYMBOL_GPL(gen_pool_get); 620 620 621 621 #ifdef CONFIG_OF 622 622 /** ··· 642 642 of_node_put(np_pool); 643 643 if (!pdev) 644 644 return NULL; 645 - return dev_get_gen_pool(&pdev->dev); 645 + return gen_pool_get(&pdev->dev); 646 646 } 647 647 EXPORT_SYMBOL_GPL(of_get_named_gen_pool); 648 648 #endif /* CONFIG_OF */