From: Kay Sievers Date: Wed, 19 Mar 2008 12:09:56 +0000 (+0100) Subject: [SCSI] sd, sr: do not emit change event at device add X-Git-Tag: v2.6.25-rc7~58^2~2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c02e600280c605c761190ef82a6e6fa6aa7fb248;p=linux-2.6-omap-h63xx.git [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 Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 7aee64dbfbe..5fe7aaed904 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1654,6 +1654,7 @@ static int sd_probe(struct device *dev) sdkp->disk = gd; sdkp->index = index; sdkp->openers = 0; + sdkp->previous_state = 1; if (!sdp->timeout) { if (sdp->type != TYPE_MOD) diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 208565bdbe8..7ee86d4a761 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;