Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173693
b: refs/heads/master
c: 5917290
h: refs/heads/master
i:
  173691: 1b46e3c
v: v3
  • Loading branch information
Chandra Seetharaman authored and James Bottomley committed Dec 4, 2009
1 parent 1e732cc commit e00bc88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 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: cd7560cb69489c6b798b61897449989b4e972327
refs/heads/master: 5917290ce9b376866b165d02a5ed88d5ecdb32d0
11 changes: 4 additions & 7 deletions trunk/drivers/scsi/device_handler/scsi_dh.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,18 +304,15 @@ static int scsi_dh_notifier(struct notifier_block *nb,
sdev = to_scsi_device(dev);

if (action == BUS_NOTIFY_ADD_DEVICE) {
err = device_create_file(dev, &scsi_dh_state_attr);
/* don't care about err */
devinfo = device_handler_match(NULL, sdev);
if (!devinfo)
goto out;

err = scsi_dh_handler_attach(sdev, devinfo);
if (!err)
err = device_create_file(dev, &scsi_dh_state_attr);
if (devinfo)
err = scsi_dh_handler_attach(sdev, devinfo);
} else if (action == BUS_NOTIFY_DEL_DEVICE) {
device_remove_file(dev, &scsi_dh_state_attr);
scsi_dh_handler_detach(sdev, NULL);
}
out:
return err;
}

Expand Down

0 comments on commit e00bc88

Please sign in to comment.