Skip to content

Commit

Permalink
ipmi: add pci remove handling
Browse files Browse the repository at this point in the history
Add pci_remove handling to the driver, so it will clean up if
the device is hot-removed.

Signed-off-by: Corey Minyard <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
cminyard authored and Linus Torvalds committed May 8, 2007
1 parent f64da95 commit fca3b74
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/char/ipmi/ipmi_si_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2189,12 +2189,15 @@ static int __devinit ipmi_pci_probe(struct pci_dev *pdev,
info->irq_setup = std_irq_setup;

info->dev = &pdev->dev;
pci_set_drvdata(pdev, info);

return try_smi_init(info);
}

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
Expand Down

0 comments on commit fca3b74

Please sign in to comment.