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>
This commit is contained in:
David Kershner 2017-09-27 13:14:28 -04:00 committed by Greg Kroah-Hartman
parent 4e95347b18
commit 7f91228d39
1 changed files with 4 additions and 10 deletions

View File

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