aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>2015-06-30 18:00:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-30 22:45:01 -0400
commit0030edf296db8a7afb13573eb12977b7d399cd40 (patch)
tree34aa823495537f5735286df8f3835d460a840a7e
parentc1bd55f922a2df6038060ed48a82d146d301ca12 (diff)
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>
-rw-r--r--arch/arm/mach-at91/pm.c2
-rw-r--r--arch/arm/mach-imx/pm-imx5.c2
-rw-r--r--arch/arm/mach-imx/pm-imx6.c2
-rw-r--r--arch/arm/mach-socfpga/pm.c2
-rw-r--r--drivers/media/platform/coda/coda-common.c2
-rw-r--r--include/linux/genalloc.h2
-rw-r--r--lib/genalloc.c8
7 files changed, 10 insertions, 10 deletions
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 1e184767c3be..e24df77abd79 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -369,7 +369,7 @@ static void __init at91_pm_sram_init(void)
369 return; 369 return;
370 } 370 }
371 371
372 sram_pool = dev_get_gen_pool(&pdev->dev); 372 sram_pool = gen_pool_get(&pdev->dev);
373 if (!sram_pool) { 373 if (!sram_pool) {
374 pr_warn("%s: sram pool unavailable!\n", __func__); 374 pr_warn("%s: sram pool unavailable!\n", __func__);
375 return; 375 return;
diff --git a/arch/arm/mach-imx/pm-imx5.c b/arch/arm/mach-imx/pm-imx5.c
index 0309ccda36a9..1885676c23c0 100644
--- a/arch/arm/mach-imx/pm-imx5.c
+++ b/arch/arm/mach-imx/pm-imx5.c
@@ -297,7 +297,7 @@ static int __init imx_suspend_alloc_ocram(
297 goto put_node; 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 if (!ocram_pool) { 301 if (!ocram_pool) {
302 pr_warn("%s: ocram pool unavailable!\n", __func__); 302 pr_warn("%s: ocram pool unavailable!\n", __func__);
303 ret = -ENODEV; 303 ret = -ENODEV;
diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c
index b01650d94f91..93ecf559d06d 100644
--- a/arch/arm/mach-imx/pm-imx6.c
+++ b/arch/arm/mach-imx/pm-imx6.c
@@ -451,7 +451,7 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
451 goto put_node; 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 if (!ocram_pool) { 455 if (!ocram_pool) {
456 pr_warn("%s: ocram pool unavailable!\n", __func__); 456 pr_warn("%s: ocram pool unavailable!\n", __func__);
457 ret = -ENODEV; 457 ret = -ENODEV;
diff --git a/arch/arm/mach-socfpga/pm.c b/arch/arm/mach-socfpga/pm.c
index 1ed89fc2b7a8..6a4199f2bffb 100644
--- a/arch/arm/mach-socfpga/pm.c
+++ b/arch/arm/mach-socfpga/pm.c
@@ -56,7 +56,7 @@ static int socfpga_setup_ocram_self_refresh(void)
56 goto put_node; 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 if (!ocram_pool) { 60 if (!ocram_pool) {
61 pr_warn("%s: ocram pool unavailable!\n", __func__); 61 pr_warn("%s: ocram pool unavailable!\n", __func__);
62 ret = -ENODEV; 62 ret = -ENODEV;
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 6d6e0ca91fb4..6e640c0f0b35 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -2157,7 +2157,7 @@ static int coda_probe(struct platform_device *pdev)
2157 /* Get IRAM pool from device tree or platform data */ 2157 /* Get IRAM pool from device tree or platform data */
2158 pool = of_get_named_gen_pool(np, "iram", 0); 2158 pool = of_get_named_gen_pool(np, "iram", 0);
2159 if (!pool && pdata) 2159 if (!pool && pdata)
2160 pool = dev_get_gen_pool(pdata->iram_dev); 2160 pool = gen_pool_get(pdata->iram_dev);
2161 if (!pool) { 2161 if (!pool) {
2162 dev_err(&pdev->dev, "iram pool not available\n"); 2162 dev_err(&pdev->dev, "iram pool not available\n");
2163 return -ENOMEM; 2163 return -ENOMEM;
diff --git a/include/linux/genalloc.h b/include/linux/genalloc.h
index 1ccaab44abcc..015d17068615 100644
--- a/include/linux/genalloc.h
+++ b/include/linux/genalloc.h
@@ -119,7 +119,7 @@ extern unsigned long gen_pool_best_fit(unsigned long *map, unsigned long size,
119 119
120extern struct gen_pool *devm_gen_pool_create(struct device *dev, 120extern struct gen_pool *devm_gen_pool_create(struct device *dev,
121 int min_alloc_order, int nid); 121 int min_alloc_order, int nid);
122extern struct gen_pool *dev_get_gen_pool(struct device *dev); 122extern struct gen_pool *gen_pool_get(struct device *dev);
123 123
124bool addr_in_gen_pool(struct gen_pool *pool, unsigned long start, 124bool addr_in_gen_pool(struct gen_pool *pool, unsigned long start,
125 size_t size); 125 size_t size);
diff --git a/lib/genalloc.c b/lib/genalloc.c
index d214866eeea2..948e92cd9794 100644
--- a/lib/genalloc.c
+++ b/lib/genalloc.c
@@ -602,12 +602,12 @@ struct gen_pool *devm_gen_pool_create(struct device *dev, int min_alloc_order,
602EXPORT_SYMBOL(devm_gen_pool_create); 602EXPORT_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 * @dev: device to retrieve the gen_pool from 606 * @dev: device to retrieve the gen_pool from
607 * 607 *
608 * Returns the gen_pool for the device if one is present, or NULL. 608 * Returns the gen_pool for the device if one is present, or NULL.
609 */ 609 */
610struct gen_pool *dev_get_gen_pool(struct device *dev) 610struct gen_pool *gen_pool_get(struct device *dev)
611{ 611{
612 struct gen_pool **p = devres_find(dev, devm_gen_pool_release, NULL, 612 struct gen_pool **p = devres_find(dev, devm_gen_pool_release, NULL,
613 NULL); 613 NULL);
@@ -616,7 +616,7 @@ struct gen_pool *dev_get_gen_pool(struct device *dev)
616 return NULL; 616 return NULL;
617 return *p; 617 return *p;
618} 618}
619EXPORT_SYMBOL_GPL(dev_get_gen_pool); 619EXPORT_SYMBOL_GPL(gen_pool_get);
620 620
621#ifdef CONFIG_OF 621#ifdef CONFIG_OF
622/** 622/**
@@ -642,7 +642,7 @@ struct gen_pool *of_get_named_gen_pool(struct device_node *np,
642 of_node_put(np_pool); 642 of_node_put(np_pool);
643 if (!pdev) 643 if (!pdev)
644 return NULL; 644 return NULL;
645 return dev_get_gen_pool(&pdev->dev); 645 return gen_pool_get(&pdev->dev);
646} 646}
647EXPORT_SYMBOL_GPL(of_get_named_gen_pool); 647EXPORT_SYMBOL_GPL(of_get_named_gen_pool);
648#endif /* CONFIG_OF */ 648#endif /* CONFIG_OF */