Input: random formatting fixes
authorBaodong Chen <chenbdchenbd@gmail.com>
Mon, 30 Jul 2012 05:33:03 +0000 (22:33 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 22 Aug 2012 05:29:49 +0000 (22:29 -0700)
Fixes for some coding style issues reported by scripts/checkpatch.pl
utility.

Signed-off-by: Baodong Chen <chenbdchenbd@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/apm-power.c
drivers/input/ff-core.c
drivers/input/ff-memless.c
drivers/input/joydev.c
drivers/input/mousedev.c
drivers/input/sparse-keymap.c

index e90ee3d306132aa91348485110ee8ac3fd119665..650177a3c858ba13159bbed2dbc9148c66370ec3 100644 (file)
@@ -33,7 +33,7 @@ static void system_power_event(unsigned int keycode)
 }
 
 static void apmpower_event(struct input_handle *handle, unsigned int type,
-                       unsigned int code, int value)
+                          unsigned int code, int value)
 {
        /* only react on key down events */
        if (value != 1)
index 480eb9d9876a57a79f4b7b5c599aa38db909faea..f50f6dd92274c3d25f686c02e5f710d71a9f4102 100644 (file)
@@ -138,8 +138,8 @@ int input_ff_upload(struct input_dev *dev, struct ff_effect *effect,
 
        if (effect->id == -1) {
                for (id = 0; id < ff->max_effects; id++)
-                    if (!ff->effect_owners[id])
-                       break;
+                       if (!ff->effect_owners[id])
+                               break;
 
                if (id >= ff->max_effects) {
                        ret = -ENOSPC;
index b107922514fb378a89e8951d985a0e89d5ed481d..74c0d8c6002aca6f74957c7f3a596f63e550199c 100644 (file)
@@ -72,12 +72,14 @@ static const struct ff_envelope *get_envelope(const struct ff_effect *effect)
        static const struct ff_envelope empty_envelope;
 
        switch (effect->type) {
-               case FF_PERIODIC:
-                       return &effect->u.periodic.envelope;
-               case FF_CONSTANT:
-                       return &effect->u.constant.envelope;
-               default:
-                       return &empty_envelope;
+       case FF_PERIODIC:
+               return &effect->u.periodic.envelope;
+
+       case FF_CONSTANT:
+               return &effect->u.constant.envelope;
+
+       default:
+               return &empty_envelope;
        }
 }
 
index 26043cc6a0165f80a36e7ee31436cc128a318de1..78f323ea1e4bff2821dcd8cd73bedf90ede73cbc 100644 (file)
@@ -711,7 +711,7 @@ static long joydev_ioctl(struct file *file,
 
        case JS_SET_ALL:
                retval = copy_from_user(&joydev->glue, argp,
-                                       sizeof(joydev->glue)) ? -EFAULT: 0;
+                                       sizeof(joydev->glue)) ? -EFAULT : 0;
                break;
 
        case JS_GET_ALL:
index 0110b5a3a1678a7a0843672b8505e6f42c664fc1..964e43d81e29d9224a3261a0666f84dd500100c6 100644 (file)
@@ -551,17 +551,16 @@ static int mousedev_open(struct inode *inode, struct file *file)
                return -ENODEV;
 
        error = mutex_lock_interruptible(&mousedev_table_mutex);
-       if (error) {
+       if (error)
                return error;
-       }
+
        mousedev = mousedev_table[i];
        if (mousedev)
                get_device(&mousedev->dev);
        mutex_unlock(&mousedev_table_mutex);
 
-       if (!mousedev) {
+       if (!mousedev)
                return -ENODEV;
-       }
 
        client = kzalloc(sizeof(struct mousedev_client), GFP_KERNEL);
        if (!client) {
@@ -1088,7 +1087,7 @@ static int __init mousedev_init(void)
 #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
        error = misc_register(&psaux_mouse);
        if (error)
-               pr_warning("could not register psaux device, error: %d\n",
+               pr_warn("could not register psaux device, error: %d\n",
                           error);
        else
                psaux_registered = 1;
index 75fb040a3435c246b2077e96b5730f3d7030586b..a70aa555bbffe34d38d1e6f1378b697b9ee8665e 100644 (file)
@@ -180,11 +180,11 @@ int sparse_keymap_setup(struct input_dev *dev,
        for (e = keymap; e->type != KE_END; e++)
                map_size++;
 
-       map = kcalloc(map_size, sizeof (struct key_entry), GFP_KERNEL);
+       map = kcalloc(map_size, sizeof(struct key_entry), GFP_KERNEL);
        if (!map)
                return -ENOMEM;
 
-       memcpy(map, keymap, map_size * sizeof (struct key_entry));
+       memcpy(map, keymap, map_size * sizeof(struct key_entry));
 
        for (i = 0; i < map_size; i++) {
                entry = &map[i];