Input: random formatting fixes

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>
This commit is contained in:
Baodong Chen 2012-07-29 22:33:03 -07:00 committed by Dmitry Torokhov
parent 112b51cfa2
commit 41091ad0b8
6 changed files with 18 additions and 17 deletions

View 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)

View 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;

View 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;
}
}

View 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:

View 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;

View 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];