forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'pcmcia' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM pcmcia updates from Russell King: "A series of changes updating the PXA and SA11x0 PCMCIA code to use devm_* APIs, and resolve some resource leaks in doing so. This results in a few small cleanups which are included in this set. FYI, the recommit of these today is to add Robert Jarzmik's reviewed-by tags, which I'd forgotten to add from mid-July" * 'pcmcia' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: pcmcia: soc_common: remove skt_dev_info's clk pointer pcmcia: sa11xx_base.c: remove useless init/exit functions pcmcia: sa1111: simplify clk handing in sa1111_pcmcia_add() pcmcia: sa1111: update socket driver to use devm_clk_get() API pcmcia: pxa2xx: convert memory allocation to devm_* API pcmcia: pxa2xx: update socket driver to use devm_clk_get() API pcmcia: sa11x0: convert memory allocation to devm_* API pcmcia: sa11x0: fix missing clk_put() in sa11x0 socket drivers
- Loading branch information
Showing
5 changed files
with
14 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -222,18 +222,17 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, | |
int i, ret = 0; | ||
struct clk *clk; | ||
|
||
clk = clk_get(dev, NULL); | ||
clk = devm_clk_get(dev, NULL); | ||
if (IS_ERR(clk)) | ||
return PTR_ERR(clk); | ||
|
||
sa11xx_drv_pcmcia_ops(ops); | ||
|
||
sinfo = kzalloc(SKT_DEV_INFO_SIZE(nr), GFP_KERNEL); | ||
sinfo = devm_kzalloc(dev, SKT_DEV_INFO_SIZE(nr), GFP_KERNEL); | ||
if (!sinfo) | ||
return -ENOMEM; | ||
|
||
sinfo->nskt = nr; | ||
sinfo->clk = clk; | ||
|
||
/* Initialize processor specific parameters */ | ||
for (i = 0; i < nr; i++) { | ||
|
@@ -251,8 +250,6 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, | |
if (ret) { | ||
while (--i >= 0) | ||
soc_pcmcia_remove_one(&sinfo->skt[i]); | ||
clk_put(clk); | ||
kfree(sinfo); | ||
} else { | ||
dev_set_drvdata(dev, sinfo); | ||
} | ||
|
@@ -261,16 +258,6 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, | |
} | ||
EXPORT_SYMBOL(sa11xx_drv_pcmcia_probe); | ||
|
||
static int __init sa11xx_pcmcia_init(void) | ||
{ | ||
return 0; | ||
} | ||
fs_initcall(sa11xx_pcmcia_init); | ||
|
||
static void __exit sa11xx_pcmcia_exit(void) {} | ||
|
||
module_exit(sa11xx_pcmcia_exit); | ||
|
||
MODULE_AUTHOR("John Dorsey <[email protected]>"); | ||
MODULE_DESCRIPTION("Linux PCMCIA Card Services: SA-11xx core socket driver"); | ||
MODULE_LICENSE("Dual MPL/GPL"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters