diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2013-02-28 12:07:55 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-03-07 09:52:24 +0100 |
commit | aebfa669d9fe77876f120d3d9a28fee240fe5a8e (patch) | |
tree | b1552eddfd5572fcb1bfc82aaae2e0cd6d7d4ab4 /drivers/s390/cio/scm.c | |
parent | 4fa3c019640ef776e393345ed35d9ec5c51aa3c1 (diff) |
s390/scm: process availability
Let the bus code process scm availability information and
notify scm device drivers about the new state.
Reviewed-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/scm.c')
-rw-r--r-- | drivers/s390/cio/scm.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/s390/cio/scm.c b/drivers/s390/cio/scm.c index 31ac2649997..46ec25632e8 100644 --- a/drivers/s390/cio/scm.c +++ b/drivers/s390/cio/scm.c @@ -297,6 +297,22 @@ int scm_update_information(void) return ret; } +static int scm_dev_avail(struct device *dev, void *unused) +{ + struct scm_driver *scmdrv = to_scm_drv(dev->driver); + struct scm_device *scmdev = to_scm_dev(dev); + + if (dev->driver && scmdrv->notify) + scmdrv->notify(scmdev, SCM_AVAIL); + + return 0; +} + +int scm_process_availability_information(void) +{ + return bus_for_each_dev(&scm_bus_type, NULL, NULL, scm_dev_avail); +} + static int __init scm_init(void) { int ret; |