|
@@ -140,19 +140,6 @@ static void ssb_device_put(struct ssb_device *dev)
|
|
put_device(dev->dev);
|
|
put_device(dev->dev);
|
|
}
|
|
}
|
|
|
|
|
|
-static inline struct ssb_driver *ssb_driver_get(struct ssb_driver *drv)
|
|
|
|
-{
|
|
|
|
- if (drv)
|
|
|
|
- get_driver(&drv->drv);
|
|
|
|
- return drv;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static inline void ssb_driver_put(struct ssb_driver *drv)
|
|
|
|
-{
|
|
|
|
- if (drv)
|
|
|
|
- put_driver(&drv->drv);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static int ssb_device_resume(struct device *dev)
|
|
static int ssb_device_resume(struct device *dev)
|
|
{
|
|
{
|
|
struct ssb_device *ssb_dev = dev_to_ssb_dev(dev);
|
|
struct ssb_device *ssb_dev = dev_to_ssb_dev(dev);
|
|
@@ -250,11 +237,9 @@ int ssb_devices_freeze(struct ssb_bus *bus, struct ssb_freeze_context *ctx)
|
|
ssb_device_put(sdev);
|
|
ssb_device_put(sdev);
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- sdrv = ssb_driver_get(drv_to_ssb_drv(sdev->dev->driver));
|
|
|
|
- if (!sdrv || SSB_WARN_ON(!sdrv->remove)) {
|
|
|
|
- ssb_device_put(sdev);
|
|
|
|
|
|
+ sdrv = drv_to_ssb_drv(sdev->dev->driver);
|
|
|
|
+ if (SSB_WARN_ON(!sdrv->remove))
|
|
continue;
|
|
continue;
|
|
- }
|
|
|
|
sdrv->remove(sdev);
|
|
sdrv->remove(sdev);
|
|
ctx->device_frozen[i] = 1;
|
|
ctx->device_frozen[i] = 1;
|
|
}
|
|
}
|
|
@@ -293,7 +278,6 @@ int ssb_devices_thaw(struct ssb_freeze_context *ctx)
|
|
dev_name(sdev->dev));
|
|
dev_name(sdev->dev));
|
|
result = err;
|
|
result = err;
|
|
}
|
|
}
|
|
- ssb_driver_put(sdrv);
|
|
|
|
ssb_device_put(sdev);
|
|
ssb_device_put(sdev);
|
|
}
|
|
}
|
|
|
|
|