summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys
diff options
context:
space:
mode:
authorDavid Kershner <david.kershner@unisys.com>2017-09-27 13:14:28 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-09-28 11:17:14 +0200
commit7f91228d3966adf5c6df250c3da5af66f8140455 (patch)
tree76087b8cd6cbe9e3b353d3a0177d74c3708f7f5c /drivers/staging/unisys
parent4e95347b1894a635df3cac133c6016399ef30240 (diff)
downloadlinux-7f91228d3966adf5c6df250c3da5af66f8140455.tar.gz
linux-7f91228d3966adf5c6df250c3da5af66f8140455.tar.bz2
linux-7f91228d3966adf5c6df250c3da5af66f8140455.zip
staging: unisys: visorbus: to_visor_device/to_visor_driver move up
The macros to_visor_device and to_visor_driver are fairly small; move them up to the declaration block to save some space. 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>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r--drivers/staging/unisys/visorbus/visorbus_main.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 740a36aac77e..46e6a4c76190 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -490,11 +490,8 @@ static void dev_stop_periodic_work(struct visor_device *dev)
*/
static int visordriver_remove_device(struct device *xdev)
{
- struct visor_device *dev;
- struct visor_driver *drv;
-
- dev = to_visor_device(xdev);
- drv = to_visor_driver(xdev->driver);
+ struct visor_device *dev = to_visor_device(xdev);
+ struct visor_driver *drv = to_visor_driver(xdev->driver);
mutex_lock(&dev->visordriver_callback_lock);
dev->being_removed = true;
@@ -863,11 +860,8 @@ static void publish_vbus_dev_info(struct visor_device *visordev)
static int visordriver_probe_device(struct device *xdev)
{
int err;
- struct visor_driver *drv;
- struct visor_device *dev;
-
- dev = to_visor_device(xdev);
- drv = to_visor_driver(xdev->driver);
+ struct visor_driver *drv = to_visor_driver(xdev->driver);
+ struct visor_device *dev = to_visor_device(xdev);
mutex_lock(&dev->visordriver_callback_lock);
dev->being_removed = false;