mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
[S390] pm: io subchannel driver power management callbacks
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
dcbd16d511
commit
93a275921d
1 changed files with 14 additions and 0 deletions
|
@ -138,6 +138,19 @@ static struct css_device_id io_subchannel_ids[] = {
|
|||
};
|
||||
MODULE_DEVICE_TABLE(css, io_subchannel_ids);
|
||||
|
||||
static int io_subchannel_prepare(struct subchannel *sch)
|
||||
{
|
||||
struct ccw_device *cdev;
|
||||
/*
|
||||
* Don't allow suspend while a ccw device registration
|
||||
* is still outstanding.
|
||||
*/
|
||||
cdev = sch_get_cdev(sch);
|
||||
if (cdev && !device_is_registered(&cdev->dev))
|
||||
return -EAGAIN;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct css_driver io_subchannel_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.subchannel_type = io_subchannel_ids,
|
||||
|
@ -148,6 +161,7 @@ static struct css_driver io_subchannel_driver = {
|
|||
.probe = io_subchannel_probe,
|
||||
.remove = io_subchannel_remove,
|
||||
.shutdown = io_subchannel_shutdown,
|
||||
.prepare = io_subchannel_prepare,
|
||||
};
|
||||
|
||||
struct workqueue_struct *ccw_device_work;
|
||||
|
|
Loading…
Reference in a new issue