Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757626AbZFDQUX (ORCPT ); Thu, 4 Jun 2009 12:20:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756636AbZFDQTI (ORCPT ); Thu, 4 Jun 2009 12:19:08 -0400 Received: from mtagate2.de.ibm.com ([195.212.17.162]:58994 "EHLO mtagate2.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754617AbZFDQTB (ORCPT ); Thu, 4 Jun 2009 12:19:01 -0400 Message-Id: <20090604161901.589303552@de.ibm.com> References: <20090604161847.513682672@de.ibm.com> User-Agent: quilt/0.46-1 Date: Thu, 04 Jun 2009 18:18:56 +0200 From: Martin Schwidefsky To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, linux-pm@lists.linux-foundation.org Cc: Heiko Carstens , Cornelia Huck , Sebastian Ott , Martin Schwidefsky Subject: [patch 09/38] pm: io subchannel driver power management callbacks Content-Disposition: inline; filename=pm_io_sch.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1601 Lines: 53 From: Cornelia Huck Signed-off-by: Cornelia Huck Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky --- drivers/s390/cio/device.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) Index: linux-2.6/drivers/s390/cio/device.c =================================================================== --- linux-2.6.orig/drivers/s390/cio/device.c +++ linux-2.6/drivers/s390/cio/device.c @@ -138,6 +138,19 @@ static struct css_device_id io_subchanne }; 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_d .probe = io_subchannel_probe, .remove = io_subchannel_remove, .shutdown = io_subchannel_shutdown, + .prepare = io_subchannel_prepare, }; struct workqueue_struct *ccw_device_work; -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/