ipmi: add pci remove handling

Add pci_remove handling to the driver, so it will clean up if
the device is hot-removed.

Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Corey Minyard 2007-05-08 00:23:59 -07:00 committed by Linus Torvalds
parent f64da958df
commit fca3b74779

View File

@ -2189,12 +2189,15 @@ static int __devinit ipmi_pci_probe(struct pci_dev *pdev,
info->irq_setup = std_irq_setup; info->irq_setup = std_irq_setup;
info->dev = &pdev->dev; info->dev = &pdev->dev;
pci_set_drvdata(pdev, info);
return try_smi_init(info); return try_smi_init(info);
} }
static void __devexit ipmi_pci_remove(struct pci_dev *pdev) static void __devexit ipmi_pci_remove(struct pci_dev *pdev)
{ {
struct smi_info *info = pci_get_drvdata(pdev);
cleanup_one_si(info);
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM