Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173245
b: refs/heads/master
c: 24a1872
h: refs/heads/master
i:
  173243: d485a5f
v: v3
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Dec 7, 2009
1 parent 7f5ad31 commit dd48f61
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7d253b9a1aaf5192808e641659f4feb122faa536
refs/heads/master: 24a1872d6411c7cce82c0888a4fbea23e993e051
6 changes: 6 additions & 0 deletions trunk/drivers/s390/cio/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,11 @@ int ccw_device_is_orphan(struct ccw_device *cdev)
static void ccw_device_unregister(struct ccw_device *cdev)
{
if (device_is_registered(&cdev->dev)) {
/* Undo device_add(). */
device_del(&cdev->dev);
}
if (cdev->private->flags.initialized) {
cdev->private->flags.initialized = 0;
/* Release reference from device_initialize(). */
put_device(&cdev->dev);
}
Expand Down Expand Up @@ -716,6 +720,7 @@ static int io_subchannel_initialize_dev(struct subchannel *sch,
put_device(&cdev->dev);
return -ENODEV;
}
cdev->private->flags.initialized = 1;
return 0;
}

Expand Down Expand Up @@ -998,6 +1003,7 @@ static int io_subchannel_probe(struct subchannel *sch)
cdev = sch_get_cdev(sch);
cdev->dev.groups = ccwdev_attr_groups;
device_initialize(&cdev->dev);
cdev->private->flags.initialized = 1;
ccw_device_register(cdev);
/*
* Check if the device is already online. If it is
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/s390/cio/io_sch.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ struct ccw_device_private {
unsigned int resuming:1; /* recognition while resume */
unsigned int pgroup:1; /* pathgroup is set up */
unsigned int mpath:1; /* multipathing is set up */
unsigned int initialized:1; /* set if initial reference held */
} __attribute__((packed)) flags;
unsigned long intparm; /* user interruption parameter */
struct qdio_irq *qdio_data;
Expand Down

0 comments on commit dd48f61

Please sign in to comment.