diff options
author | Joe Perches <joe@perches.com> | 2014-10-10 09:12:47 -0700 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2015-05-30 16:09:04 +0200 |
commit | f2e6cf76751d479874216f989f6bef6da6e80119 (patch) | |
tree | a9dbcf36f41db4c065f07381abae177a9d348815 /drivers/pcmcia/cs.c | |
parent | 3ce3c1c4fefa48f429a4379f729e44a9e6ba657a (diff) | |
download | linux-f2e6cf76751d479874216f989f6bef6da6e80119.tar.bz2 |
pcmcia: Convert dev_printk to dev_<level>
Reduce object size a little by using dev_<level>
calls instead of dev_printk(KERN_<LEVEL>.
Other miscellanea:
o Coalesce formats
o Realign arguments
o Use pr_cont instead of naked printk
reorder test to use "%s\n"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/cs.c')
-rw-r--r-- | drivers/pcmcia/cs.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index 5292db69c426..8007bfda720a 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c @@ -177,8 +177,8 @@ int pcmcia_register_socket(struct pcmcia_socket *socket) wait_for_completion(&socket->thread_done); if (!socket->thread) { - dev_printk(KERN_WARNING, &socket->dev, - "PCMCIA: warning: socket thread did not start\n"); + dev_warn(&socket->dev, + "PCMCIA: warning: socket thread did not start\n"); return -EIO; } @@ -275,7 +275,7 @@ static int socket_reset(struct pcmcia_socket *skt) msleep(unreset_check * 10); } - dev_printk(KERN_ERR, &skt->dev, "time out after reset.\n"); + dev_err(&skt->dev, "time out after reset\n"); return -ETIMEDOUT; } @@ -325,8 +325,8 @@ static void socket_shutdown(struct pcmcia_socket *s) s->ops->get_status(s, &status); if (status & SS_POWERON) { - dev_printk(KERN_ERR, &s->dev, - "*** DANGER *** unable to remove socket power\n"); + dev_err(&s->dev, + "*** DANGER *** unable to remove socket power\n"); } s->state &= ~SOCKET_INUSE; @@ -356,15 +356,13 @@ static int socket_setup(struct pcmcia_socket *skt, int initial_delay) } if (status & SS_PENDING) { - dev_printk(KERN_ERR, &skt->dev, - "voltage interrogation timed out.\n"); + dev_err(&skt->dev, "voltage interrogation timed out\n"); return -ETIMEDOUT; } if (status & SS_CARDBUS) { if (!(skt->features & SS_CAP_CARDBUS)) { - dev_printk(KERN_ERR, &skt->dev, - "cardbus cards are not supported.\n"); + dev_err(&skt->dev, "cardbus cards are not supported\n"); return -EINVAL; } skt->state |= SOCKET_CARDBUS; @@ -379,7 +377,7 @@ static int socket_setup(struct pcmcia_socket *skt, int initial_delay) else if (!(status & SS_XVCARD)) skt->socket.Vcc = skt->socket.Vpp = 50; else { - dev_printk(KERN_ERR, &skt->dev, "unsupported voltage key.\n"); + dev_err(&skt->dev, "unsupported voltage key\n"); return -EIO; } @@ -396,7 +394,7 @@ static int socket_setup(struct pcmcia_socket *skt, int initial_delay) skt->ops->get_status(skt, &status); if (!(status & SS_POWERON)) { - dev_printk(KERN_ERR, &skt->dev, "unable to apply power.\n"); + dev_err(&skt->dev, "unable to apply power\n"); return -EIO; } @@ -429,8 +427,7 @@ static int socket_insert(struct pcmcia_socket *skt) if (ret == 0) { skt->state |= SOCKET_PRESENT; - dev_printk(KERN_NOTICE, &skt->dev, - "pccard: %s card inserted into slot %d\n", + dev_notice(&skt->dev, "pccard: %s card inserted into slot %d\n", (skt->state & SOCKET_CARDBUS) ? "CardBus" : "PCMCIA", skt->sock); @@ -558,8 +555,7 @@ static int socket_resume(struct pcmcia_socket *skt) static void socket_remove(struct pcmcia_socket *skt) { - dev_printk(KERN_NOTICE, &skt->dev, - "pccard: card ejected from slot %d\n", skt->sock); + dev_notice(&skt->dev, "pccard: card ejected from slot %d\n", skt->sock); socket_shutdown(skt); } @@ -605,8 +601,7 @@ static int pccardd(void *__skt) /* register with the device core */ ret = device_register(&skt->dev); if (ret) { - dev_printk(KERN_WARNING, &skt->dev, - "PCMCIA: unable to register socket\n"); + dev_warn(&skt->dev, "PCMCIA: unable to register socket\n"); skt->thread = NULL; complete(&skt->thread_done); return 0; |