diff options
author | Corey Minyard <minyard@acm.org> | 2007-05-08 03:23:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:14:58 -0400 |
commit | fca3b747795ae24f9667b6c9a69975f9eb98a2c0 (patch) | |
tree | 932dede732c3fade670141425055cdc9793a9255 /drivers | |
parent | f64da958dfc83335de1d2bef9d3868f30feb4e53 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index a323cc7a0265..6c5d15de3317 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -2189,12 +2189,15 @@ static int __devinit ipmi_pci_probe(struct pci_dev *pdev, | |||
2189 | info->irq_setup = std_irq_setup; | 2189 | info->irq_setup = std_irq_setup; |
2190 | 2190 | ||
2191 | info->dev = &pdev->dev; | 2191 | info->dev = &pdev->dev; |
2192 | pci_set_drvdata(pdev, info); | ||
2192 | 2193 | ||
2193 | return try_smi_init(info); | 2194 | return try_smi_init(info); |
2194 | } | 2195 | } |
2195 | 2196 | ||
2196 | static void __devexit ipmi_pci_remove(struct pci_dev *pdev) | 2197 | static void __devexit ipmi_pci_remove(struct pci_dev *pdev) |
2197 | { | 2198 | { |
2199 | struct smi_info *info = pci_get_drvdata(pdev); | ||
2200 | cleanup_one_si(info); | ||
2198 | } | 2201 | } |
2199 | 2202 | ||
2200 | #ifdef CONFIG_PM | 2203 | #ifdef CONFIG_PM |