On Thu, 20 Sep 2007 16:26:15 +0900,
Tejun Heo <[email protected]> wrote:
> Sysfs now allows direct suicide. Make suicidial sysfs nodes to use
> it and remove now unncessary callback mechanism.
>
> Signed-off-by: Tejun Heo <[email protected]>
> ---
> drivers/base/core.c | 33 ----------------------
> drivers/s390/cio/ccwgroup.c | 25 +++-------------
> drivers/scsi/scsi_sysfs.c | 13 +--------
> fs/sysfs/file.c | 63 -------------------------------------------
> include/linux/device.h | 6 ----
> include/linux/sysfs.h | 9 ------
> 6 files changed, 6 insertions(+), 143 deletions(-)
>
Just browsing through this (I'll review and do some tests later), but
you missed drivers/s390/cio/device.c::ccw_device_remove_disconnected().
Following (not event compile tested) patch (which is basically a revert
of 59a8a6e227cf0bc42e5be741ebfea97c222ab9ef) should take care of it.
Signed-off-by: Cornelia Huck <[email protected]>
---
drivers/s390/cio/device.c | 51 +++++++++-------------------------------------
1 files changed, 10 insertions(+), 41 deletions(-)
--- linux-2.6.orig/drivers/s390/cio/device.c
+++ linux-2.6/drivers/s390/cio/device.c
@@ -288,62 +288,31 @@ static void ccw_device_unregister(struct
device_del(&cdev->dev);
}
-static void ccw_device_remove_orphan_cb(struct device *dev)
-{
- struct ccw_device *cdev = to_ccwdev(dev);
-
- ccw_device_unregister(cdev);
- put_device(&cdev->dev);
-}
-
-static void ccw_device_remove_sch_cb(struct device *dev)
-{
- struct subchannel *sch;
-
- sch = to_subchannel(dev);
- css_sch_device_unregister(sch);
- /* Reset intparm to zeroes. */
- sch->schib.pmcw.intparm = 0;
- cio_modify(sch);
- put_device(&sch->dev);
-}
-
static void
ccw_device_remove_disconnected(struct ccw_device *cdev)
{
+ struct subchannel *sch;
unsigned long flags;
- int rc;
/*
* Forced offline in disconnected state means
* 'throw away device'.
*/
if (ccw_device_is_orphan(cdev)) {
- /*
- * Deregister ccw device.
- * Unfortunately, we cannot do this directly from the
- * attribute method.
- */
+ /* Deregister ccw device. */
spin_lock_irqsave(cdev->ccwlock, flags);
cdev->private->state = DEV_STATE_NOT_OPER;
spin_unlock_irqrestore(cdev->ccwlock, flags);
- rc = device_schedule_callback(&cdev->dev,
- ccw_device_remove_orphan_cb);
- if (rc)
- CIO_MSG_EVENT(2, "Couldn't unregister orphan "
- "0.%x.%04x\n",
- cdev->private->dev_id.ssid,
- cdev->private->dev_id.devno);
+ ccw_device_unregister(cdev);
+ put_device(&cdev->dev);
return;
}
- /* Deregister subchannel, which will kill the ccw device. */
- rc = device_schedule_callback(cdev->dev.parent,
- ccw_device_remove_sch_cb);
- if (rc)
- CIO_MSG_EVENT(2, "Couldn't unregister disconnected device "
- "0.%x.%04x\n",
- cdev->private->dev_id.ssid,
- cdev->private->dev_id.devno);
+ sch = to_subchannel(cdev->dev.parent);
+ css_sch_device_unregister(sch);
+ /* Reset intparm to zeroes. */
+ sch->schib.pmcw.intparm = 0;
+ cio_modify(sch);
+ put_device(&sch->dev);
}
/**
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]