Skip to content

Commit 0030edf

Browse files
Vladimir Zapolskiytorvalds
authored andcommitted
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>
1 parent c1bd55f commit 0030edf

7 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎arch/arm/mach-at91/pm.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ static void __init at91_pm_sram_init(void)
369369
return;
370370
}
371371

372-
sram_pool = dev_get_gen_pool(&pdev->dev);
372+
sram_pool = gen_pool_get(&pdev->dev);
373373
if (!sram_pool) {
374374
pr_warn("%s: sram pool unavailable!\n", __func__);
375375
return;

‎arch/arm/mach-imx/pm-imx5.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ static int __init imx_suspend_alloc_ocram(
297297
goto put_node;
298298
}
299299

300-
ocram_pool = dev_get_gen_pool(&pdev->dev);
300+
ocram_pool = gen_pool_get(&pdev->dev);
301301
if (!ocram_pool) {
302302
pr_warn("%s: ocram pool unavailable!\n", __func__);
303303
ret = -ENODEV;

‎arch/arm/mach-imx/pm-imx6.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
451451
goto put_node;
452452
}
453453

454-
ocram_pool = dev_get_gen_pool(&pdev->dev);
454+
ocram_pool = gen_pool_get(&pdev->dev);
455455
if (!ocram_pool) {
456456
pr_warn("%s: ocram pool unavailable!\n", __func__);
457457
ret = -ENODEV;

‎arch/arm/mach-socfpga/pm.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static int socfpga_setup_ocram_self_refresh(void)
5656
goto put_node;
5757
}
5858

59-
ocram_pool = dev_get_gen_pool(&pdev->dev);
59+
ocram_pool = gen_pool_get(&pdev->dev);
6060
if (!ocram_pool) {
6161
pr_warn("%s: ocram pool unavailable!\n", __func__);
6262
ret = -ENODEV;

‎drivers/media/platform/coda/coda-common.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2157,7 +2157,7 @@ static int coda_probe(struct platform_device *pdev)
21572157
/* Get IRAM pool from device tree or platform data */
21582158
pool = of_get_named_gen_pool(np, "iram", 0);
21592159
if (!pool && pdata)
2160-
pool = dev_get_gen_pool(pdata->iram_dev);
2160+
pool = gen_pool_get(pdata->iram_dev);
21612161
if (!pool) {
21622162
dev_err(&pdev->dev, "iram pool not available\n");
21632163
return -ENOMEM;

‎include/linux/genalloc.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ extern unsigned long gen_pool_best_fit(unsigned long *map, unsigned long size,
119119

120120
extern struct gen_pool *devm_gen_pool_create(struct device *dev,
121121
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);
123123

124124
bool addr_in_gen_pool(struct gen_pool *pool, unsigned long start,
125125
size_t size);

‎lib/genalloc.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -602,12 +602,12 @@ struct gen_pool *devm_gen_pool_create(struct device *dev, int min_alloc_order,
602602
EXPORT_SYMBOL(devm_gen_pool_create);
603603

604604
/**
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
606606
* @dev: device to retrieve the gen_pool from
607607
*
608608
* Returns the gen_pool for the device if one is present, or NULL.
609609
*/
610-
struct gen_pool *dev_get_gen_pool(struct device *dev)
610+
struct gen_pool *gen_pool_get(struct device *dev)
611611
{
612612
struct gen_pool **p = devres_find(dev, devm_gen_pool_release, NULL,
613613
NULL);
@@ -616,7 +616,7 @@ struct gen_pool *dev_get_gen_pool(struct device *dev)
616616
return NULL;
617617
return *p;
618618
}
619-
EXPORT_SYMBOL_GPL(dev_get_gen_pool);
619+
EXPORT_SYMBOL_GPL(gen_pool_get);
620620

621621
#ifdef CONFIG_OF
622622
/**
@@ -642,7 +642,7 @@ struct gen_pool *of_get_named_gen_pool(struct device_node *np,
642642
of_node_put(np_pool);
643643
if (!pdev)
644644
return NULL;
645-
return dev_get_gen_pool(&pdev->dev);
645+
return gen_pool_get(&pdev->dev);
646646
}
647647
EXPORT_SYMBOL_GPL(of_get_named_gen_pool);
648648
#endif /* CONFIG_OF */

0 commit comments

Comments
 (0)