staging: unisys: visorinput: use the full 80 characters of the screen

Several of the comments in the code were not using the full 80 characters
of the screen. This patch combines the lines to make full use of the
screen.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
David Kershner 2018-01-31 11:41:17 -05:00 committed by Greg Kroah-Hartman
parent 20a36e2983
commit 43a1b9b2ca

View File

@ -97,9 +97,9 @@ enum visorinput_dev_type {
}; };
/* /*
* This is the private data that we store for each device. * This is the private data that we store for each device. A pointer to this
* A pointer to this struct is maintained via * struct is maintained via dev_get_drvdata() / dev_set_drvdata() for each
* dev_get_drvdata() / dev_set_drvdata() for each struct device. * struct device.
*/ */
struct visorinput_devdata { struct visorinput_devdata {
struct visor_device *dev; struct visor_device *dev;
@ -270,10 +270,9 @@ static int visorinput_open(struct input_dev *visorinput_dev)
dev_dbg(&visorinput_dev->dev, "%s opened\n", __func__); dev_dbg(&visorinput_dev->dev, "%s opened\n", __func__);
/* /*
* If we're not paused, really enable interrupts. * If we're not paused, really enable interrupts. Regardless of whether
* Regardless of whether we are paused, set a flag indicating * we are paused, set a flag indicating interrupts should be enabled so
* interrupts should be enabled so when we resume, interrupts * when we resume, interrupts will really be enabled.
* will really be enabled.
*/ */
mutex_lock(&devdata->lock_visor_dev); mutex_lock(&devdata->lock_visor_dev);
devdata->interrupts_enabled = true; devdata->interrupts_enabled = true;
@ -299,10 +298,9 @@ static void visorinput_close(struct input_dev *visorinput_dev)
dev_dbg(&visorinput_dev->dev, "%s closed\n", __func__); dev_dbg(&visorinput_dev->dev, "%s closed\n", __func__);
/* /*
* If we're not paused, really disable interrupts. * If we're not paused, really disable interrupts. Regardless of
* Regardless of whether we are paused, set a flag indicating * whether we are paused, set a flag indicating interrupts should be
* interrupts should be disabled so when we resume we will * disabled so when we resume we will not re-enable them.
* not re-enable them.
*/ */
mutex_lock(&devdata->lock_visor_dev); mutex_lock(&devdata->lock_visor_dev);
devdata->interrupts_enabled = false; devdata->interrupts_enabled = false;
@ -315,9 +313,9 @@ out_unlock:
} }
/* /*
* setup_client_keyboard() initializes and returns a Linux input node that * setup_client_keyboard() initializes and returns a Linux input node that we
* we can use to deliver keyboard inputs to Linux. We of course do this when * can use to deliver keyboard inputs to Linux. We of course do this when we
* we see keyboard inputs coming in on a keyboard channel. * see keyboard inputs coming in on a keyboard channel.
*/ */
static struct input_dev *setup_client_keyboard(void *devdata, static struct input_dev *setup_client_keyboard(void *devdata,
unsigned char *keycode_table) unsigned char *keycode_table)
@ -424,9 +422,9 @@ static struct visorinput_devdata *devdata_create(struct visor_device *dev,
devdata->paused = true; devdata->paused = true;
/* /*
* This is an input device in a client guest partition, * This is an input device in a client guest partition, so we need to
* so we need to create whatever input nodes are necessary to * create whatever input nodes are necessary to deliver our inputs to
* deliver our inputs to the guest OS. * the guest OS.
*/ */
switch (dtype) { switch (dtype) {
case visorinput_keyboard: case visorinput_keyboard:
@ -463,10 +461,9 @@ static struct visorinput_devdata *devdata_create(struct visor_device *dev,
/* /*
* Device struct is completely set up now, with the exception of * Device struct is completely set up now, with the exception of
* visorinput_dev being registered. * visorinput_dev being registered. We need to unlock before we
* We need to unlock before we register the device, because this * register the device, because this can cause an on-stack call of
* can cause an on-stack call of visorinput_open(), which would * visorinput_open(), which would deadlock if we had the lock.
* deadlock if we had the lock.
*/ */
if (input_register_device(devdata->visorinput_dev)) { if (input_register_device(devdata->visorinput_dev)) {
input_free_device(devdata->visorinput_dev); input_free_device(devdata->visorinput_dev);
@ -475,9 +472,9 @@ static struct visorinput_devdata *devdata_create(struct visor_device *dev,
mutex_lock(&devdata->lock_visor_dev); mutex_lock(&devdata->lock_visor_dev);
/* /*
* Establish calls to visorinput_channel_interrupt() if that is * Establish calls to visorinput_channel_interrupt() if that is the
* the desired state that we've kept track of in interrupts_enabled * desired state that we've kept track of in interrupts_enabled while
* while the device was being created. * the device was being created.
*/ */
devdata->paused = false; devdata->paused = false;
if (devdata->interrupts_enabled) if (devdata->interrupts_enabled)
@ -528,8 +525,8 @@ static void visorinput_remove(struct visor_device *dev)
visorbus_disable_channel_interrupts(dev); visorbus_disable_channel_interrupts(dev);
/* /*
* due to above, at this time no thread of execution will be * due to above, at this time no thread of execution will be in
* in visorinput_channel_interrupt() * visorinput_channel_interrupt()
*/ */
dev_set_drvdata(&dev->device, NULL); dev_set_drvdata(&dev->device, NULL);
@ -572,9 +569,8 @@ static void handle_locking_key(struct input_dev *visorinput_dev, int keycode,
} }
/* /*
* <scancode> is either a 1-byte scancode, or an extended 16-bit scancode * <scancode> is either a 1-byte scancode, or an extended 16-bit scancode with
* with 0xE0 in the low byte and the extended scancode value in the next * 0xE0 in the low byte and the extended scancode value in the next higher byte.
* higher byte.
*/ */
static int scancode_to_keycode(int scancode) static int scancode_to_keycode(int scancode)
{ {
@ -715,8 +711,8 @@ static int visorinput_pause(struct visor_device *dev,
visorbus_disable_channel_interrupts(dev); visorbus_disable_channel_interrupts(dev);
/* /*
* due to above, at this time no thread of execution will be * due to above, at this time no thread of execution will be in
* in visorinput_channel_interrupt() * visorinput_channel_interrupt()
*/ */
devdata->paused = true; devdata->paused = true;
complete_func(dev, 0); complete_func(dev, 0);
@ -746,9 +742,9 @@ static int visorinput_resume(struct visor_device *dev,
complete_func(dev, 0); complete_func(dev, 0);
/* /*
* Re-establish calls to visorinput_channel_interrupt() if that is * Re-establish calls to visorinput_channel_interrupt() if that is the
* the desired state that we've kept track of in interrupts_enabled * desired state that we've kept track of in interrupts_enabled while
* while the device was paused. * the device was paused.
*/ */
if (devdata->interrupts_enabled) if (devdata->interrupts_enabled)
visorbus_enable_channel_interrupts(dev); visorbus_enable_channel_interrupts(dev);