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:
parent
112b51cfa2
commit
41091ad0b8
@ -33,7 +33,7 @@ static void system_power_event(unsigned int keycode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void apmpower_event(struct input_handle *handle, unsigned int type,
|
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 */
|
/* only react on key down events */
|
||||||
if (value != 1)
|
if (value != 1)
|
||||||
|
@ -138,8 +138,8 @@ int input_ff_upload(struct input_dev *dev, struct ff_effect *effect,
|
|||||||
|
|
||||||
if (effect->id == -1) {
|
if (effect->id == -1) {
|
||||||
for (id = 0; id < ff->max_effects; id++)
|
for (id = 0; id < ff->max_effects; id++)
|
||||||
if (!ff->effect_owners[id])
|
if (!ff->effect_owners[id])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (id >= ff->max_effects) {
|
if (id >= ff->max_effects) {
|
||||||
ret = -ENOSPC;
|
ret = -ENOSPC;
|
||||||
|
@ -72,12 +72,14 @@ static const struct ff_envelope *get_envelope(const struct ff_effect *effect)
|
|||||||
static const struct ff_envelope empty_envelope;
|
static const struct ff_envelope empty_envelope;
|
||||||
|
|
||||||
switch (effect->type) {
|
switch (effect->type) {
|
||||||
case FF_PERIODIC:
|
case FF_PERIODIC:
|
||||||
return &effect->u.periodic.envelope;
|
return &effect->u.periodic.envelope;
|
||||||
case FF_CONSTANT:
|
|
||||||
return &effect->u.constant.envelope;
|
case FF_CONSTANT:
|
||||||
default:
|
return &effect->u.constant.envelope;
|
||||||
return &empty_envelope;
|
|
||||||
|
default:
|
||||||
|
return &empty_envelope;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -711,7 +711,7 @@ static long joydev_ioctl(struct file *file,
|
|||||||
|
|
||||||
case JS_SET_ALL:
|
case JS_SET_ALL:
|
||||||
retval = copy_from_user(&joydev->glue, argp,
|
retval = copy_from_user(&joydev->glue, argp,
|
||||||
sizeof(joydev->glue)) ? -EFAULT: 0;
|
sizeof(joydev->glue)) ? -EFAULT : 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case JS_GET_ALL:
|
case JS_GET_ALL:
|
||||||
|
@ -551,17 +551,16 @@ static int mousedev_open(struct inode *inode, struct file *file)
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
error = mutex_lock_interruptible(&mousedev_table_mutex);
|
error = mutex_lock_interruptible(&mousedev_table_mutex);
|
||||||
if (error) {
|
if (error)
|
||||||
return error;
|
return error;
|
||||||
}
|
|
||||||
mousedev = mousedev_table[i];
|
mousedev = mousedev_table[i];
|
||||||
if (mousedev)
|
if (mousedev)
|
||||||
get_device(&mousedev->dev);
|
get_device(&mousedev->dev);
|
||||||
mutex_unlock(&mousedev_table_mutex);
|
mutex_unlock(&mousedev_table_mutex);
|
||||||
|
|
||||||
if (!mousedev) {
|
if (!mousedev)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
|
||||||
|
|
||||||
client = kzalloc(sizeof(struct mousedev_client), GFP_KERNEL);
|
client = kzalloc(sizeof(struct mousedev_client), GFP_KERNEL);
|
||||||
if (!client) {
|
if (!client) {
|
||||||
@ -1088,7 +1087,7 @@ static int __init mousedev_init(void)
|
|||||||
#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
|
#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
|
||||||
error = misc_register(&psaux_mouse);
|
error = misc_register(&psaux_mouse);
|
||||||
if (error)
|
if (error)
|
||||||
pr_warning("could not register psaux device, error: %d\n",
|
pr_warn("could not register psaux device, error: %d\n",
|
||||||
error);
|
error);
|
||||||
else
|
else
|
||||||
psaux_registered = 1;
|
psaux_registered = 1;
|
||||||
|
@ -180,11 +180,11 @@ int sparse_keymap_setup(struct input_dev *dev,
|
|||||||
for (e = keymap; e->type != KE_END; e++)
|
for (e = keymap; e->type != KE_END; e++)
|
||||||
map_size++;
|
map_size++;
|
||||||
|
|
||||||
map = kcalloc(map_size, sizeof (struct key_entry), GFP_KERNEL);
|
map = kcalloc(map_size, sizeof(struct key_entry), GFP_KERNEL);
|
||||||
if (!map)
|
if (!map)
|
||||||
return -ENOMEM;
|
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++) {
|
for (i = 0; i < map_size; i++) {
|
||||||
entry = &map[i];
|
entry = &map[i];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user