aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-02-21 23:55:31 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-02-22 01:10:12 -0500
commita1e1274747b2741188b554e35dc5d4056ef7beac (patch)
tree769c5673cd3c46b6b5ecf122161aa4f0b373d7a3 /drivers/input/joystick
parentaf930d646251a6d3f4fd80c5fe158177487f43b7 (diff)
Input: gamecon - use pr_err() and friends
Tested-by: Scott Moreau <oreaus@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/joystick')
-rw-r--r--drivers/input/joystick/gamecon.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c
index 9ba65eae5f6..ae998d99a5a 100644
--- a/drivers/input/joystick/gamecon.c
+++ b/drivers/input/joystick/gamecon.c
@@ -30,6 +30,8 @@
30 * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic 30 * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
31 */ 31 */
32 32
33#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
34
33#include <linux/kernel.h> 35#include <linux/kernel.h>
34#include <linux/delay.h> 36#include <linux/delay.h>
35#include <linux/module.h> 37#include <linux/module.h>
@@ -818,13 +820,13 @@ static int __init gc_setup_pad(struct gc *gc, int idx, int pad_type)
818 int err; 820 int err;
819 821
820 if (pad_type < 1 || pad_type > GC_MAX) { 822 if (pad_type < 1 || pad_type > GC_MAX) {
821 printk(KERN_WARNING "gamecon.c: Pad type %d unknown\n", pad_type); 823 pr_err("Pad type %d unknown\n", pad_type);
822 return -EINVAL; 824 return -EINVAL;
823 } 825 }
824 826
825 pad->dev = input_dev = input_allocate_device(); 827 pad->dev = input_dev = input_allocate_device();
826 if (!input_dev) { 828 if (!input_dev) {
827 printk(KERN_ERR "gamecon.c: Not enough memory for input device\n"); 829 pr_err("Not enough memory for input device\n");
828 return -ENOMEM; 830 return -ENOMEM;
829 } 831 }
830 832
@@ -868,7 +870,7 @@ static int __init gc_setup_pad(struct gc *gc, int idx, int pad_type)
868 870
869 err = gc_n64_init_ff(input_dev, idx); 871 err = gc_n64_init_ff(input_dev, idx);
870 if (err) { 872 if (err) {
871 printk(KERN_WARNING "gamecon.c: Failed to initiate rumble for N64 device %d\n", idx); 873 pr_warning("Failed to initiate rumble for N64 device %d\n", idx);
872 goto err_free_dev; 874 goto err_free_dev;
873 } 875 }
874 876
@@ -936,21 +938,21 @@ static struct gc __init *gc_probe(int parport, int *pads, int n_pads)
936 938
937 pp = parport_find_number(parport); 939 pp = parport_find_number(parport);
938 if (!pp) { 940 if (!pp) {
939 printk(KERN_ERR "gamecon.c: no such parport\n"); 941 pr_err("no such parport %d\n", parport);
940 err = -EINVAL; 942 err = -EINVAL;
941 goto err_out; 943 goto err_out;
942 } 944 }
943 945
944 pd = parport_register_device(pp, "gamecon", NULL, NULL, NULL, PARPORT_DEV_EXCL, NULL); 946 pd = parport_register_device(pp, "gamecon", NULL, NULL, NULL, PARPORT_DEV_EXCL, NULL);
945 if (!pd) { 947 if (!pd) {
946 printk(KERN_ERR "gamecon.c: parport busy already - lp.o loaded?\n"); 948 pr_err("parport busy already - lp.o loaded?\n");
947 err = -EBUSY; 949 err = -EBUSY;
948 goto err_put_pp; 950 goto err_put_pp;
949 } 951 }
950 952
951 gc = kzalloc(sizeof(struct gc), GFP_KERNEL); 953 gc = kzalloc(sizeof(struct gc), GFP_KERNEL);
952 if (!gc) { 954 if (!gc) {
953 printk(KERN_ERR "gamecon.c: Not enough memory\n"); 955 pr_err("Not enough memory\n");
954 err = -ENOMEM; 956 err = -ENOMEM;
955 goto err_unreg_pardev; 957 goto err_unreg_pardev;
956 } 958 }
@@ -971,7 +973,7 @@ static struct gc __init *gc_probe(int parport, int *pads, int n_pads)
971 } 973 }
972 974
973 if (count == 0) { 975 if (count == 0) {
974 printk(KERN_ERR "gamecon.c: No valid devices specified\n"); 976 pr_err("No valid devices specified\n");
975 err = -EINVAL; 977 err = -EINVAL;
976 goto err_free_gc; 978 goto err_free_gc;
977 } 979 }
@@ -1015,7 +1017,7 @@ static int __init gc_init(void)
1015 continue; 1017 continue;
1016 1018
1017 if (gc_cfg[i].nargs < 2) { 1019 if (gc_cfg[i].nargs < 2) {
1018 printk(KERN_ERR "gamecon.c: at least one device must be specified\n"); 1020 pr_err("at least one device must be specified\n");
1019 err = -EINVAL; 1021 err = -EINVAL;
1020 break; 1022 break;
1021 } 1023 }