Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c02e6002 authored by Kay Sievers's avatar Kay Sievers Committed by James Bottomley
Browse files

[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: default avatarKay Sievers <kay.sievers@vrfy.org>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 4d4109d0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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)
+1 −0
Original line number Diff line number Diff line
@@ -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;