diff options
author | Russell King - ARM Linux <linux@arm.linux.org.uk> | 2009-03-26 17:14:19 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2009-11-09 02:30:08 -0500 |
commit | 0f767de6a26a07f7d58394512b6f6c96322f047f (patch) | |
tree | 564a8c8c1b2ba960b03bf3235e16239f0ece9937 /drivers/pcmcia/soc_common.c | |
parent | a7149f9a26eb44a5658d56335c23104ba529e9f6 (diff) |
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.c | 16 |
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) | |||
609 | "notifier for PCMCIA (%d)\n", ret); | 609 | "notifier for PCMCIA (%d)\n", ret); |
610 | return ret; | 610 | return ret; |
611 | } | 611 | } |
612 | fs_initcall(soc_pcmcia_cpufreq_register); | ||
612 | 613 | ||
613 | static void soc_pcmcia_cpufreq_unregister(void) | 614 | static void soc_pcmcia_cpufreq_unregister(void) |
614 | { | 615 | { |
615 | cpufreq_unregister_notifier(&soc_pcmcia_notifier_block, CPUFREQ_TRANSITION_NOTIFIER); | 616 | cpufreq_unregister_notifier(&soc_pcmcia_notifier_block, CPUFREQ_TRANSITION_NOTIFIER); |
616 | } | 617 | } |
618 | module_exit(soc_pcmcia_cpufreq_unregister); | ||
617 | 619 | ||
618 | #else | ||
619 | static int soc_pcmcia_cpufreq_register(void) { return 0; } | ||
620 | static void soc_pcmcia_cpufreq_unregister(void) {} | ||
621 | #endif | 620 | #endif |
622 | 621 | ||
623 | int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, | 622 | 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 | |||
668 | goto out_err_5; | 667 | goto out_err_5; |
669 | } | 668 | } |
670 | 669 | ||
671 | if (list_empty(&soc_pcmcia_sockets)) | ||
672 | soc_pcmcia_cpufreq_register(); | ||
673 | |||
674 | list_add(&skt->node, &soc_pcmcia_sockets); | 670 | list_add(&skt->node, &soc_pcmcia_sockets); |
675 | 671 | ||
676 | /* | 672 | /* |
@@ -743,6 +739,7 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops | |||
743 | mutex_unlock(&soc_pcmcia_sockets_lock); | 739 | mutex_unlock(&soc_pcmcia_sockets_lock); |
744 | return ret; | 740 | return ret; |
745 | } | 741 | } |
742 | EXPORT_SYMBOL(soc_common_drv_pcmcia_probe); | ||
746 | 743 | ||
747 | int soc_common_drv_pcmcia_remove(struct device *dev) | 744 | int soc_common_drv_pcmcia_remove(struct device *dev) |
748 | { | 745 | { |
@@ -773,9 +770,6 @@ int soc_common_drv_pcmcia_remove(struct device *dev) | |||
773 | release_resource(&skt->res_io); | 770 | release_resource(&skt->res_io); |
774 | release_resource(&skt->res_skt); | 771 | release_resource(&skt->res_skt); |
775 | } | 772 | } |
776 | if (list_empty(&soc_pcmcia_sockets)) | ||
777 | soc_pcmcia_cpufreq_unregister(); | ||
778 | |||
779 | mutex_unlock(&soc_pcmcia_sockets_lock); | 773 | mutex_unlock(&soc_pcmcia_sockets_lock); |
780 | 774 | ||
781 | kfree(sinfo); | 775 | kfree(sinfo); |
@@ -783,3 +777,7 @@ int soc_common_drv_pcmcia_remove(struct device *dev) | |||
783 | return 0; | 777 | return 0; |
784 | } | 778 | } |
785 | EXPORT_SYMBOL(soc_common_drv_pcmcia_remove); | 779 | EXPORT_SYMBOL(soc_common_drv_pcmcia_remove); |
780 | |||
781 | MODULE_AUTHOR("John Dorsey <john+@cs.cmu.edu>"); | ||
782 | MODULE_DESCRIPTION("Linux PCMCIA Card Services: Common SoC support"); | ||
783 | MODULE_LICENSE("Dual MPL/GPL"); | ||