Commit 20a36e29 authored by David Kershner's avatar David Kershner Committed by Greg Kroah-Hartman

staging: unisys: visorinput: Fix spacing after open paranthesis

Checkpatch was giving errors about an open parenthesis being the last thing
on a line. This patch cleans up some names and removes the checkpatch
warnings.
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Reviewed-by: default avatarTim Sell <timothy.sell@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c52e07ce
...@@ -91,7 +91,7 @@ struct visor_input_channel_data { ...@@ -91,7 +91,7 @@ struct visor_input_channel_data {
}; };
} __packed; } __packed;
enum visorinput_device_type { enum visorinput_dev_type {
visorinput_keyboard, visorinput_keyboard,
visorinput_mouse, visorinput_mouse,
}; };
...@@ -397,16 +397,15 @@ static struct input_dev *setup_client_mouse(void *devdata, unsigned int xres, ...@@ -397,16 +397,15 @@ static struct input_dev *setup_client_mouse(void *devdata, unsigned int xres,
return visorinput_dev; return visorinput_dev;
} }
static struct visorinput_devdata *devdata_create( static struct visorinput_devdata *devdata_create(struct visor_device *dev,
struct visor_device *dev, enum visorinput_dev_type dtype)
enum visorinput_device_type devtype)
{ {
struct visorinput_devdata *devdata = NULL; struct visorinput_devdata *devdata = NULL;
unsigned int extra_bytes = 0; unsigned int extra_bytes = 0;
unsigned int size, xres, yres, err; unsigned int size, xres, yres, err;
struct visor_input_channel_data data; struct visor_input_channel_data data;
if (devtype == visorinput_keyboard) if (dtype == visorinput_keyboard)
/* allocate room for devdata->keycode_table, filled in below */ /* allocate room for devdata->keycode_table, filled in below */
extra_bytes = KEYCODE_TABLE_BYTES * 2; extra_bytes = KEYCODE_TABLE_BYTES * 2;
devdata = kzalloc(sizeof(*devdata) + extra_bytes, GFP_KERNEL); devdata = kzalloc(sizeof(*devdata) + extra_bytes, GFP_KERNEL);
...@@ -429,7 +428,7 @@ static struct visorinput_devdata *devdata_create( ...@@ -429,7 +428,7 @@ static struct visorinput_devdata *devdata_create(
* so we need to create whatever input nodes are necessary to * so we need to create whatever input nodes are necessary to
* deliver our inputs to the guest OS. * deliver our inputs to the guest OS.
*/ */
switch (devtype) { switch (dtype) {
case visorinput_keyboard: case visorinput_keyboard:
devdata->keycode_table_bytes = extra_bytes; devdata->keycode_table_bytes = extra_bytes;
memcpy(devdata->keycode_table, visorkbd_keycode, memcpy(devdata->keycode_table, visorkbd_keycode,
...@@ -497,17 +496,17 @@ static struct visorinput_devdata *devdata_create( ...@@ -497,17 +496,17 @@ static struct visorinput_devdata *devdata_create(
static int visorinput_probe(struct visor_device *dev) static int visorinput_probe(struct visor_device *dev)
{ {
const guid_t *guid; const guid_t *guid;
enum visorinput_device_type devtype; enum visorinput_dev_type dtype;
guid = visorchannel_get_guid(dev->visorchannel); guid = visorchannel_get_guid(dev->visorchannel);
if (guid_equal(guid, &visor_mouse_channel_guid)) if (guid_equal(guid, &visor_mouse_channel_guid))
devtype = visorinput_mouse; dtype = visorinput_mouse;
else if (guid_equal(guid, &visor_keyboard_channel_guid)) else if (guid_equal(guid, &visor_keyboard_channel_guid))
devtype = visorinput_keyboard; dtype = visorinput_keyboard;
else else
return -ENODEV; return -ENODEV;
visorbus_disable_channel_interrupts(dev); visorbus_disable_channel_interrupts(dev);
if (!devdata_create(dev, devtype)) if (!devdata_create(dev, dtype))
return -ENOMEM; return -ENOMEM;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment