Commit 2e55bf6b authored by Dominik Brodowski's avatar Dominik Brodowski

pcmcia: use dev_printk in module pcmcia_core

Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent dd797d81
...@@ -92,7 +92,8 @@ set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int flag ...@@ -92,7 +92,8 @@ set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int flag
if (!(s->features & SS_CAP_STATIC_MAP) && (mem->res == NULL)) { if (!(s->features & SS_CAP_STATIC_MAP) && (mem->res == NULL)) {
mem->res = pcmcia_find_mem_region(0, s->map_size, s->map_size, 0, s); mem->res = pcmcia_find_mem_region(0, s->map_size, s->map_size, 0, s);
if (mem->res == NULL) { if (mem->res == NULL) {
printk(KERN_NOTICE "cs: unable to map card memory!\n"); dev_printk(KERN_NOTICE, &s->dev,
"cs: unable to map card memory!\n");
return NULL; return NULL;
} }
s->cis_virt = NULL; s->cis_virt = NULL;
......
...@@ -247,7 +247,8 @@ int pcmcia_register_socket(struct pcmcia_socket *socket) ...@@ -247,7 +247,8 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
wait_for_completion(&socket->thread_done); wait_for_completion(&socket->thread_done);
if (!socket->thread) { if (!socket->thread) {
printk(KERN_WARNING "PCMCIA: warning: socket thread for socket %p did not start\n", socket); dev_printk(KERN_WARNING, &socket->dev,
"PCMCIA: warning: socket thread did not start\n");
return -EIO; return -EIO;
} }
...@@ -412,7 +413,8 @@ static void socket_shutdown(struct pcmcia_socket *s) ...@@ -412,7 +413,8 @@ static void socket_shutdown(struct pcmcia_socket *s)
s->ops->get_status(s, &status); s->ops->get_status(s, &status);
if (status & SS_POWERON) { if (status & SS_POWERON) {
printk(KERN_ERR "PCMCIA: socket %p: *** DANGER *** unable to remove socket power\n", s); dev_printk(KERN_ERR, &s->dev,
"*** DANGER *** unable to remove socket power\n");
} }
cs_socket_put(s); cs_socket_put(s);
...@@ -508,7 +510,8 @@ static int socket_insert(struct pcmcia_socket *skt) ...@@ -508,7 +510,8 @@ static int socket_insert(struct pcmcia_socket *skt)
if (ret == CS_SUCCESS) { if (ret == CS_SUCCESS) {
skt->state |= SOCKET_PRESENT; skt->state |= SOCKET_PRESENT;
printk(KERN_NOTICE "pccard: %s card inserted into slot %d\n", dev_printk(KERN_NOTICE, &skt->dev,
"pccard: %s card inserted into slot %d\n",
(skt->state & SOCKET_CARDBUS) ? "CardBus" : "PCMCIA", (skt->state & SOCKET_CARDBUS) ? "CardBus" : "PCMCIA",
skt->sock); skt->sock);
...@@ -595,7 +598,8 @@ static int socket_resume(struct pcmcia_socket *skt) ...@@ -595,7 +598,8 @@ static int socket_resume(struct pcmcia_socket *skt)
static void socket_remove(struct pcmcia_socket *skt) static void socket_remove(struct pcmcia_socket *skt)
{ {
printk(KERN_NOTICE "pccard: card ejected from slot %d\n", skt->sock); dev_printk(KERN_NOTICE, &skt->dev,
"pccard: card ejected from slot %d\n", skt->sock);
socket_shutdown(skt); socket_shutdown(skt);
} }
...@@ -641,8 +645,8 @@ static int pccardd(void *__skt) ...@@ -641,8 +645,8 @@ static int pccardd(void *__skt)
/* register with the device core */ /* register with the device core */
ret = device_register(&skt->dev); ret = device_register(&skt->dev);
if (ret) { if (ret) {
printk(KERN_WARNING "PCMCIA: unable to register socket 0x%p\n", dev_printk(KERN_WARNING, &skt->dev,
skt); "PCMCIA: unable to register socket\n");
skt->thread = NULL; skt->thread = NULL;
complete(&skt->thread_done); complete(&skt->thread_done);
return 0; return 0;
......
...@@ -137,8 +137,8 @@ extern int cs_debug_level(int); ...@@ -137,8 +137,8 @@ extern int cs_debug_level(int);
#define cs_dbg(skt, lvl, fmt, arg...) do { \ #define cs_dbg(skt, lvl, fmt, arg...) do { \
if (cs_debug_level(lvl)) \ if (cs_debug_level(lvl)) \
printk(KERN_DEBUG "cs: %s: " fmt, \ dev_printk(KERN_DEBUG, &skt->dev, \
cs_socket_name(skt) , ## arg); \ "cs: " fmt, ## arg); \
} while (0) } while (0)
#else #else
...@@ -146,6 +146,6 @@ extern int cs_debug_level(int); ...@@ -146,6 +146,6 @@ extern int cs_debug_level(int);
#endif #endif
#define cs_err(skt, fmt, arg...) \ #define cs_err(skt, fmt, arg...) \
printk(KERN_ERR "cs: %s: " fmt, (skt)->dev.bus_id , ## arg) dev_printk(KERN_ERR, &skt->dev, "cs: " fmt, ## arg)
#endif /* _LINUX_CS_INTERNAL_H */ #endif /* _LINUX_CS_INTERNAL_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment