From 21fab1d0595eacf781705ec3509012a28f298245 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Sat, 1 Aug 2009 00:43:59 +0000 Subject: [SCSI] ses: update enclosure data on hot add Now that hot add works correctly, if a new device is added, we're still operating on stale enclosure data, so fix that by updating the enclosure diagnostic pages when we get notified of a device hot add Signed-off-by: James Bottomley Signed-off-by: James Bottomley --- drivers/misc/enclosure.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/misc/enclosure.c') diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c index 850706a5e553..7b039306037f 100644 --- a/drivers/misc/enclosure.c +++ b/drivers/misc/enclosure.c @@ -315,6 +315,9 @@ int enclosure_add_device(struct enclosure_device *edev, int component, cdev = &edev->component[component]; + if (cdev->dev == dev) + return -EEXIST; + if (cdev->dev) enclosure_remove_links(cdev); -- cgit v1.2.2