Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173244
b: refs/heads/master
c: 7d253b9
h: refs/heads/master
v: v3
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Dec 7, 2009
1 parent d485a5f commit 7f5ad31
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d7d12ef2befac4fed0dccaddff11338b654804df
refs/heads/master: 7d253b9a1aaf5192808e641659f4feb122faa536
11 changes: 3 additions & 8 deletions trunk/drivers/s390/cio/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ int ccw_device_is_orphan(struct ccw_device *cdev)

static void ccw_device_unregister(struct ccw_device *cdev)
{
if (test_and_clear_bit(1, &cdev->private->registered)) {
if (device_is_registered(&cdev->dev)) {
device_del(&cdev->dev);
/* Release reference from device_initialize(). */
put_device(&cdev->dev);
Expand Down Expand Up @@ -640,12 +640,7 @@ static int ccw_device_register(struct ccw_device *cdev)
cdev->private->dev_id.devno);
if (ret)
return ret;
ret = device_add(dev);
if (ret)
return ret;

set_bit(1, &cdev->private->registered);
return ret;
return device_add(dev);
}

static int match_dev_id(struct device *dev, void *data)
Expand All @@ -669,7 +664,7 @@ static void ccw_device_do_unbind_bind(struct ccw_device *cdev)
{
int ret;

if (test_bit(1, &cdev->private->registered)) {
if (device_is_registered(&cdev->dev)) {
device_release_driver(&cdev->dev);
ret = device_attach(&cdev->dev);
WARN_ON(ret == -ENODEV);
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/s390/cio/io_sch.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ struct ccw_device_private {
struct subchannel *sch;
int state; /* device state */
atomic_t onoff;
unsigned long registered;
struct ccw_dev_id dev_id; /* device id */
struct subchannel_id schid; /* subchannel number */
struct ccw_request req; /* internal I/O request */
Expand Down

0 comments on commit 7f5ad31

Please sign in to comment.