diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-03 12:03:07 (GMT) |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-08-23 00:34:36 (GMT) |
commit | 79ba6757277ea7228480bee4c56c0f028f806b91 (patch) | |
tree | f725be3a9e8a8e29b9aba9dd94307095923376dd /include/pcmcia/ds.h | |
parent | 9c8b7965f594fdff37c59446b9314ed7b4b44d07 (diff) | |
download | linux-79ba6757277ea7228480bee4c56c0f028f806b91.tar.xz |
pcmcia: use dev_printk for cs_error()
Use dev_printk() in cs_error()-based error reporting. While this
function-turned-macro will hopefully go away soon, using dev_printk
simplifies the code much.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'include/pcmcia/ds.h')
-rw-r--r-- | include/pcmcia/ds.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index 9ff9de9..a98bbf4 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h @@ -249,7 +249,18 @@ struct pcmcia_device { #define handle_to_dev(handle) (handle->dev) /* error reporting */ -void cs_error(struct pcmcia_device *handle, int func, int ret); + +const char *pcmcia_error_func(int func); +const char *pcmcia_error_ret(int ret); + +#define cs_error(p_dev, func, ret) \ + { \ + dev_printk(KERN_NOTICE, &p_dev->dev, \ + "%s : %s\n", \ + pcmcia_error_func(func), \ + pcmcia_error_ret(ret)); \ + } + #endif /* __KERNEL__ */ #endif /* _LINUX_DS_H */ |