From 41091ad0b8f843d36390058362c8f3c52a26a333 Mon Sep 17 00:00:00 2001 From: Baodong Chen Date: Sun, 29 Jul 2012 22:33:03 -0700 Subject: [PATCH] Input: random formatting fixes Fixes for some coding style issues reported by scripts/checkpatch.pl utility. Signed-off-by: Baodong Chen Signed-off-by: Dmitry Torokhov --- drivers/input/apm-power.c | 2 +- drivers/input/ff-core.c | 4 ++-- drivers/input/ff-memless.c | 14 ++++++++------ drivers/input/joydev.c | 2 +- drivers/input/mousedev.c | 9 ++++----- drivers/input/sparse-keymap.c | 4 ++-- 6 files changed, 18 insertions(+), 17 deletions(-) diff --git a/drivers/input/apm-power.c b/drivers/input/apm-power.c index e90ee3d3061..650177a3c85 100644 --- a/drivers/input/apm-power.c +++ b/drivers/input/apm-power.c @@ -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) diff --git a/drivers/input/ff-core.c b/drivers/input/ff-core.c index 480eb9d9876..f50f6dd9227 100644 --- a/drivers/input/ff-core.c +++ b/drivers/input/ff-core.c @@ -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; diff --git a/drivers/input/ff-memless.c b/drivers/input/ff-memless.c index b107922514f..74c0d8c6002 100644 --- a/drivers/input/ff-memless.c +++ b/drivers/input/ff-memless.c @@ -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; } } diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 26043cc6a01..78f323ea1e4 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c @@ -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: diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index 0110b5a3a16..964e43d81e2 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c @@ -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; diff --git a/drivers/input/sparse-keymap.c b/drivers/input/sparse-keymap.c index 75fb040a343..a70aa555bbf 100644 --- a/drivers/input/sparse-keymap.c +++ b/drivers/input/sparse-keymap.c @@ -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];