summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sr.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-03-19 13:09:56 +0100
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-03-19 11:28:56 -0500
commitc02e600280c605c761190ef82a6e6fa6aa7fb248 (patch)
tree3275148d08bfaa8374e3462a1bcab7cfc4788f7c /drivers/scsi/sr.c
parent4d4109d0eb6930e59942d019980b83af679f187b (diff)
downloadlinux-c02e600280c605c761190ef82a6e6fa6aa7fb248.tar.gz
linux-c02e600280c605c761190ef82a6e6fa6aa7fb248.tar.bz2
linux-c02e600280c605c761190ef82a6e6fa6aa7fb248.zip
[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/scsi/sr.c')
-rw-r--r--drivers/scsi/sr.c1
1 files changed, 1 insertions, 0 deletions
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)
cd->disk = disk;
cd->capacity = 0x1fffff;
cd->device->changed = 1; /* force recheck CD type */
+ cd->previous_state = 1;
cd->use = 1;
cd->readcd_known = 0;
cd->readcd_cdda = 0;