diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-03-19 08:09:56 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-03-19 12:28:56 -0400 |
commit | c02e600280c605c761190ef82a6e6fa6aa7fb248 (patch) | |
tree | 3275148d08bfaa8374e3462a1bcab7cfc4788f7c /drivers | |
parent | 4d4109d0eb6930e59942d019980b83af679f187b (diff) |
[SCSI] sd, sr: do not emit change event at device add
Initialize the "state changed" flag, so we do not send a change event
immediately after registering a new device.
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/sd.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sr.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 7aee64dbfbeb..5fe7aaed904c 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -1654,6 +1654,7 @@ static int sd_probe(struct device *dev) | |||
1654 | sdkp->disk = gd; | 1654 | sdkp->disk = gd; |
1655 | sdkp->index = index; | 1655 | sdkp->index = index; |
1656 | sdkp->openers = 0; | 1656 | sdkp->openers = 0; |
1657 | sdkp->previous_state = 1; | ||
1657 | 1658 | ||
1658 | if (!sdp->timeout) { | 1659 | if (!sdp->timeout) { |
1659 | if (sdp->type != TYPE_MOD) | 1660 | if (sdp->type != TYPE_MOD) |
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 208565bdbe8e..7ee86d4a7618 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c | |||
@@ -623,6 +623,7 @@ static int sr_probe(struct device *dev) | |||
623 | cd->disk = disk; | 623 | cd->disk = disk; |
624 | cd->capacity = 0x1fffff; | 624 | cd->capacity = 0x1fffff; |
625 | cd->device->changed = 1; /* force recheck CD type */ | 625 | cd->device->changed = 1; /* force recheck CD type */ |
626 | cd->previous_state = 1; | ||
626 | cd->use = 1; | 627 | cd->use = 1; |
627 | cd->readcd_known = 0; | 628 | cd->readcd_known = 0; |
628 | cd->readcd_cdda = 0; | 629 | cd->readcd_cdda = 0; |