summaryrefslogtreecommitdiff
path: root/drivers/pcmcia/soc_common.c
diff options
context:
space:
mode:
authorRussell King - ARM Linux <linux@arm.linux.org.uk>2009-03-27 00:14:19 +0300
committerDominik Brodowski <linux@dominikbrodowski.net>2009-11-09 10:30:08 +0300
commit0f767de6a26a07f7d58394512b6f6c96322f047f (patch)
tree564a8c8c1b2ba960b03bf3235e16239f0ece9937 /drivers/pcmcia/soc_common.c
parenta7149f9a26eb44a5658d56335c23104ba529e9f6 (diff)
downloadlinux-0f767de6a26a07f7d58394512b6f6c96322f047f.tar.xz
PCMCIA: soc_common: convert to a stand alone module
Convert soc_common.c to be a stand alone module, rather than wrapping it up into the individual SoC specific base modules. In doing this, we need to add init/exit functions for soc_common to register/remove the cpufreq notifier. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/soc_common.c')
-rw-r--r--drivers/pcmcia/soc_common.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
index ef7e9e58782b..a2d448f20b0f 100644
--- a/drivers/pcmcia/soc_common.c
+++ b/drivers/pcmcia/soc_common.c
@@ -609,15 +609,14 @@ static int soc_pcmcia_cpufreq_register(void)
"notifier for PCMCIA (%d)\n", ret);
return ret;
}
+fs_initcall(soc_pcmcia_cpufreq_register);
static void soc_pcmcia_cpufreq_unregister(void)
{
cpufreq_unregister_notifier(&soc_pcmcia_notifier_block, CPUFREQ_TRANSITION_NOTIFIER);
}
+module_exit(soc_pcmcia_cpufreq_unregister);
-#else
-static int soc_pcmcia_cpufreq_register(void) { return 0; }
-static void soc_pcmcia_cpufreq_unregister(void) {}
#endif
int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
@@ -668,9 +667,6 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops
goto out_err_5;
}
- if (list_empty(&soc_pcmcia_sockets))
- soc_pcmcia_cpufreq_register();
-
list_add(&skt->node, &soc_pcmcia_sockets);
/*
@@ -743,6 +739,7 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops
mutex_unlock(&soc_pcmcia_sockets_lock);
return ret;
}
+EXPORT_SYMBOL(soc_common_drv_pcmcia_probe);
int soc_common_drv_pcmcia_remove(struct device *dev)
{
@@ -773,9 +770,6 @@ int soc_common_drv_pcmcia_remove(struct device *dev)
release_resource(&skt->res_io);
release_resource(&skt->res_skt);
}
- if (list_empty(&soc_pcmcia_sockets))
- soc_pcmcia_cpufreq_unregister();
-
mutex_unlock(&soc_pcmcia_sockets_lock);
kfree(sinfo);
@@ -783,3 +777,7 @@ int soc_common_drv_pcmcia_remove(struct device *dev)
return 0;
}
EXPORT_SYMBOL(soc_common_drv_pcmcia_remove);
+
+MODULE_AUTHOR("John Dorsey <john+@cs.cmu.edu>");
+MODULE_DESCRIPTION("Linux PCMCIA Card Services: Common SoC support");
+MODULE_LICENSE("Dual MPL/GPL");