s390/ccwgroup: remove pm support
As s390 no longer supports ARCH_HIBERNATION_POSSIBLE, drop the unused pm ops from the ccwgroup bus driver. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
parent
41677b1d94
commit
5e1fb45ec8
|
@ -485,79 +485,10 @@ static void ccwgroup_shutdown(struct device *dev)
|
|||
gdrv->shutdown(gdev);
|
||||
}
|
||||
|
||||
static int ccwgroup_pm_prepare(struct device *dev)
|
||||
{
|
||||
struct ccwgroup_device *gdev = to_ccwgroupdev(dev);
|
||||
struct ccwgroup_driver *gdrv = to_ccwgroupdrv(gdev->dev.driver);
|
||||
|
||||
/* Fail while device is being set online/offline. */
|
||||
if (atomic_read(&gdev->onoff))
|
||||
return -EAGAIN;
|
||||
|
||||
if (!gdev->dev.driver || gdev->state != CCWGROUP_ONLINE)
|
||||
return 0;
|
||||
|
||||
return gdrv->prepare ? gdrv->prepare(gdev) : 0;
|
||||
}
|
||||
|
||||
static void ccwgroup_pm_complete(struct device *dev)
|
||||
{
|
||||
struct ccwgroup_device *gdev = to_ccwgroupdev(dev);
|
||||
struct ccwgroup_driver *gdrv = to_ccwgroupdrv(dev->driver);
|
||||
|
||||
if (!gdev->dev.driver || gdev->state != CCWGROUP_ONLINE)
|
||||
return;
|
||||
|
||||
if (gdrv->complete)
|
||||
gdrv->complete(gdev);
|
||||
}
|
||||
|
||||
static int ccwgroup_pm_freeze(struct device *dev)
|
||||
{
|
||||
struct ccwgroup_device *gdev = to_ccwgroupdev(dev);
|
||||
struct ccwgroup_driver *gdrv = to_ccwgroupdrv(gdev->dev.driver);
|
||||
|
||||
if (!gdev->dev.driver || gdev->state != CCWGROUP_ONLINE)
|
||||
return 0;
|
||||
|
||||
return gdrv->freeze ? gdrv->freeze(gdev) : 0;
|
||||
}
|
||||
|
||||
static int ccwgroup_pm_thaw(struct device *dev)
|
||||
{
|
||||
struct ccwgroup_device *gdev = to_ccwgroupdev(dev);
|
||||
struct ccwgroup_driver *gdrv = to_ccwgroupdrv(gdev->dev.driver);
|
||||
|
||||
if (!gdev->dev.driver || gdev->state != CCWGROUP_ONLINE)
|
||||
return 0;
|
||||
|
||||
return gdrv->thaw ? gdrv->thaw(gdev) : 0;
|
||||
}
|
||||
|
||||
static int ccwgroup_pm_restore(struct device *dev)
|
||||
{
|
||||
struct ccwgroup_device *gdev = to_ccwgroupdev(dev);
|
||||
struct ccwgroup_driver *gdrv = to_ccwgroupdrv(gdev->dev.driver);
|
||||
|
||||
if (!gdev->dev.driver || gdev->state != CCWGROUP_ONLINE)
|
||||
return 0;
|
||||
|
||||
return gdrv->restore ? gdrv->restore(gdev) : 0;
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops ccwgroup_pm_ops = {
|
||||
.prepare = ccwgroup_pm_prepare,
|
||||
.complete = ccwgroup_pm_complete,
|
||||
.freeze = ccwgroup_pm_freeze,
|
||||
.thaw = ccwgroup_pm_thaw,
|
||||
.restore = ccwgroup_pm_restore,
|
||||
};
|
||||
|
||||
static struct bus_type ccwgroup_bus_type = {
|
||||
.name = "ccwgroup",
|
||||
.remove = ccwgroup_remove,
|
||||
.shutdown = ccwgroup_shutdown,
|
||||
.pm = &ccwgroup_pm_ops,
|
||||
};
|
||||
|
||||
bool dev_is_ccwgroup(struct device *dev)
|
||||
|
|
Loading…
Reference in New Issue