diff options
author | Pavel Machek <pavel@ucw.cz> | 2005-10-14 18:59:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-14 20:10:12 -0400 |
commit | 4846d0172dd7fb6a77843644caa6d9a8909225b9 (patch) | |
tree | 9f0facfea0e9d8dce59e02b569a706959e4a7b65 | |
parent | 6edb7467be2195e7eeb6844e37668253af216100 (diff) |
[PATCH] zaurus: fix soc_common.c
This fixes wrong comments, non-working debug subsystem, and some
potentially dangerous macros.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/pcmcia/soc_common.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c index 888b70e6a484..9e7ccd8a4321 100644 --- a/drivers/pcmcia/soc_common.c +++ b/drivers/pcmcia/soc_common.c | |||
@@ -66,7 +66,7 @@ void soc_pcmcia_debug(struct soc_pcmcia_socket *skt, const char *func, | |||
66 | if (pc_debug > lvl) { | 66 | if (pc_debug > lvl) { |
67 | printk(KERN_DEBUG "skt%u: %s: ", skt->nr, func); | 67 | printk(KERN_DEBUG "skt%u: %s: ", skt->nr, func); |
68 | va_start(args, fmt); | 68 | va_start(args, fmt); |
69 | printk(fmt, args); | 69 | vprintk(fmt, args); |
70 | va_end(args); | 70 | va_end(args); |
71 | } | 71 | } |
72 | } | 72 | } |
@@ -321,8 +321,6 @@ soc_common_pcmcia_get_socket(struct pcmcia_socket *sock, socket_state_t *state) | |||
321 | * less punt all of this work and let the kernel handle the details | 321 | * less punt all of this work and let the kernel handle the details |
322 | * of power configuration, reset, &c. We also record the value of | 322 | * of power configuration, reset, &c. We also record the value of |
323 | * `state' in order to regurgitate it to the PCMCIA core later. | 323 | * `state' in order to regurgitate it to the PCMCIA core later. |
324 | * | ||
325 | * Returns: 0 | ||
326 | */ | 324 | */ |
327 | static int | 325 | static int |
328 | soc_common_pcmcia_set_socket(struct pcmcia_socket *sock, socket_state_t *state) | 326 | soc_common_pcmcia_set_socket(struct pcmcia_socket *sock, socket_state_t *state) |
@@ -407,7 +405,7 @@ soc_common_pcmcia_set_io_map(struct pcmcia_socket *sock, struct pccard_io_map *m | |||
407 | * the map speed as requested, but override the address ranges | 405 | * the map speed as requested, but override the address ranges |
408 | * supplied by Card Services. | 406 | * supplied by Card Services. |
409 | * | 407 | * |
410 | * Returns: 0 on success, -1 on error | 408 | * Returns: 0 on success, -ERRNO on error |
411 | */ | 409 | */ |
412 | static int | 410 | static int |
413 | soc_common_pcmcia_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map *map) | 411 | soc_common_pcmcia_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map *map) |
@@ -655,8 +653,8 @@ static void soc_pcmcia_cpufreq_unregister(void) | |||
655 | } | 653 | } |
656 | 654 | ||
657 | #else | 655 | #else |
658 | #define soc_pcmcia_cpufreq_register() | 656 | static int soc_pcmcia_cpufreq_register(void) { return 0; } |
659 | #define soc_pcmcia_cpufreq_unregister() | 657 | static void soc_pcmcia_cpufreq_unregister(void) {} |
660 | #endif | 658 | #endif |
661 | 659 | ||
662 | int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr) | 660 | int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr) |
@@ -738,7 +736,7 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops | |||
738 | goto out_err_5; | 736 | goto out_err_5; |
739 | } | 737 | } |
740 | 738 | ||
741 | if ( list_empty(&soc_pcmcia_sockets) ) | 739 | if (list_empty(&soc_pcmcia_sockets)) |
742 | soc_pcmcia_cpufreq_register(); | 740 | soc_pcmcia_cpufreq_register(); |
743 | 741 | ||
744 | list_add(&skt->node, &soc_pcmcia_sockets); | 742 | list_add(&skt->node, &soc_pcmcia_sockets); |
@@ -839,7 +837,7 @@ int soc_common_drv_pcmcia_remove(struct device *dev) | |||
839 | release_resource(&skt->res_io); | 837 | release_resource(&skt->res_io); |
840 | release_resource(&skt->res_skt); | 838 | release_resource(&skt->res_skt); |
841 | } | 839 | } |
842 | if ( list_empty(&soc_pcmcia_sockets) ) | 840 | if (list_empty(&soc_pcmcia_sockets)) |
843 | soc_pcmcia_cpufreq_unregister(); | 841 | soc_pcmcia_cpufreq_unregister(); |
844 | 842 | ||
845 | up(&soc_pcmcia_sockets_lock); | 843 | up(&soc_pcmcia_sockets_lock); |