diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-02 12:08:38 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-22 19:49:49 -0400 |
commit | 2e55bf6b99fb05f3f4228e7f1381624ac8ac7e3d (patch) | |
tree | d8dd974020a9b076d9fec0032b9f398bcca83254 /drivers/pcmcia | |
parent | dd797d81d3d7da31a50031f2741b93327ed22260 (diff) |
pcmcia: use dev_printk in module pcmcia_core
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/cistpl.c | 3 | ||||
-rw-r--r-- | drivers/pcmcia/cs.c | 20 | ||||
-rw-r--r-- | drivers/pcmcia/cs_internal.h | 6 |
3 files changed, 17 insertions, 12 deletions
diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c index 65129b54eb09..f804b45de242 100644 --- a/drivers/pcmcia/cistpl.c +++ b/drivers/pcmcia/cistpl.c | |||
@@ -92,7 +92,8 @@ set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int flag | |||
92 | if (!(s->features & SS_CAP_STATIC_MAP) && (mem->res == NULL)) { | 92 | if (!(s->features & SS_CAP_STATIC_MAP) && (mem->res == NULL)) { |
93 | mem->res = pcmcia_find_mem_region(0, s->map_size, s->map_size, 0, s); | 93 | mem->res = pcmcia_find_mem_region(0, s->map_size, s->map_size, 0, s); |
94 | if (mem->res == NULL) { | 94 | if (mem->res == NULL) { |
95 | printk(KERN_NOTICE "cs: unable to map card memory!\n"); | 95 | dev_printk(KERN_NOTICE, &s->dev, |
96 | "cs: unable to map card memory!\n"); | ||
96 | return NULL; | 97 | return NULL; |
97 | } | 98 | } |
98 | s->cis_virt = NULL; | 99 | s->cis_virt = NULL; |
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index d1207393fc3e..ceb2b0c39a6f 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c | |||
@@ -247,7 +247,8 @@ int pcmcia_register_socket(struct pcmcia_socket *socket) | |||
247 | 247 | ||
248 | wait_for_completion(&socket->thread_done); | 248 | wait_for_completion(&socket->thread_done); |
249 | if (!socket->thread) { | 249 | if (!socket->thread) { |
250 | printk(KERN_WARNING "PCMCIA: warning: socket thread for socket %p did not start\n", socket); | 250 | dev_printk(KERN_WARNING, &socket->dev, |
251 | "PCMCIA: warning: socket thread did not start\n"); | ||
251 | return -EIO; | 252 | return -EIO; |
252 | } | 253 | } |
253 | 254 | ||
@@ -412,7 +413,8 @@ static void socket_shutdown(struct pcmcia_socket *s) | |||
412 | 413 | ||
413 | s->ops->get_status(s, &status); | 414 | s->ops->get_status(s, &status); |
414 | if (status & SS_POWERON) { | 415 | if (status & SS_POWERON) { |
415 | printk(KERN_ERR "PCMCIA: socket %p: *** DANGER *** unable to remove socket power\n", s); | 416 | dev_printk(KERN_ERR, &s->dev, |
417 | "*** DANGER *** unable to remove socket power\n"); | ||
416 | } | 418 | } |
417 | 419 | ||
418 | cs_socket_put(s); | 420 | cs_socket_put(s); |
@@ -508,9 +510,10 @@ static int socket_insert(struct pcmcia_socket *skt) | |||
508 | if (ret == CS_SUCCESS) { | 510 | if (ret == CS_SUCCESS) { |
509 | skt->state |= SOCKET_PRESENT; | 511 | skt->state |= SOCKET_PRESENT; |
510 | 512 | ||
511 | printk(KERN_NOTICE "pccard: %s card inserted into slot %d\n", | 513 | dev_printk(KERN_NOTICE, &skt->dev, |
512 | (skt->state & SOCKET_CARDBUS) ? "CardBus" : "PCMCIA", | 514 | "pccard: %s card inserted into slot %d\n", |
513 | skt->sock); | 515 | (skt->state & SOCKET_CARDBUS) ? "CardBus" : "PCMCIA", |
516 | skt->sock); | ||
514 | 517 | ||
515 | #ifdef CONFIG_CARDBUS | 518 | #ifdef CONFIG_CARDBUS |
516 | if (skt->state & SOCKET_CARDBUS) { | 519 | if (skt->state & SOCKET_CARDBUS) { |
@@ -595,7 +598,8 @@ static int socket_resume(struct pcmcia_socket *skt) | |||
595 | 598 | ||
596 | static void socket_remove(struct pcmcia_socket *skt) | 599 | static void socket_remove(struct pcmcia_socket *skt) |
597 | { | 600 | { |
598 | printk(KERN_NOTICE "pccard: card ejected from slot %d\n", skt->sock); | 601 | dev_printk(KERN_NOTICE, &skt->dev, |
602 | "pccard: card ejected from slot %d\n", skt->sock); | ||
599 | socket_shutdown(skt); | 603 | socket_shutdown(skt); |
600 | } | 604 | } |
601 | 605 | ||
@@ -641,8 +645,8 @@ static int pccardd(void *__skt) | |||
641 | /* register with the device core */ | 645 | /* register with the device core */ |
642 | ret = device_register(&skt->dev); | 646 | ret = device_register(&skt->dev); |
643 | if (ret) { | 647 | if (ret) { |
644 | printk(KERN_WARNING "PCMCIA: unable to register socket 0x%p\n", | 648 | dev_printk(KERN_WARNING, &skt->dev, |
645 | skt); | 649 | "PCMCIA: unable to register socket\n"); |
646 | skt->thread = NULL; | 650 | skt->thread = NULL; |
647 | complete(&skt->thread_done); | 651 | complete(&skt->thread_done); |
648 | return 0; | 652 | return 0; |
diff --git a/drivers/pcmcia/cs_internal.h b/drivers/pcmcia/cs_internal.h index 63dc1a28bda2..fe7d729cf28b 100644 --- a/drivers/pcmcia/cs_internal.h +++ b/drivers/pcmcia/cs_internal.h | |||
@@ -137,8 +137,8 @@ extern int cs_debug_level(int); | |||
137 | 137 | ||
138 | #define cs_dbg(skt, lvl, fmt, arg...) do { \ | 138 | #define cs_dbg(skt, lvl, fmt, arg...) do { \ |
139 | if (cs_debug_level(lvl)) \ | 139 | if (cs_debug_level(lvl)) \ |
140 | printk(KERN_DEBUG "cs: %s: " fmt, \ | 140 | dev_printk(KERN_DEBUG, &skt->dev, \ |
141 | cs_socket_name(skt) , ## arg); \ | 141 | "cs: " fmt, ## arg); \ |
142 | } while (0) | 142 | } while (0) |
143 | 143 | ||
144 | #else | 144 | #else |
@@ -146,6 +146,6 @@ extern int cs_debug_level(int); | |||
146 | #endif | 146 | #endif |
147 | 147 | ||
148 | #define cs_err(skt, fmt, arg...) \ | 148 | #define cs_err(skt, fmt, arg...) \ |
149 | printk(KERN_ERR "cs: %s: " fmt, (skt)->dev.bus_id , ## arg) | 149 | dev_printk(KERN_ERR, &skt->dev, "cs: " fmt, ## arg) |
150 | 150 | ||
151 | #endif /* _LINUX_CS_INTERNAL_H */ | 151 | #endif /* _LINUX_CS_INTERNAL_H */ |