Commit 7f91228d authored by David Kershner's avatar David Kershner Committed by Greg Kroah-Hartman

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: 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 4e95347b
......@@ -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;
......
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