From: Christian Krafft Date: Sat, 12 May 2007 17:37:01 +0000 (-0700) Subject: IPMI: Add PPC openfirmware unregister X-Git-Tag: v2.6.22-rc1~6 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=10fb62e5b72c2485c3e0efd8b103254c0d087676;p=linux-2.6-omap-h63xx.git IPMI: Add PPC openfirmware unregister When trying to load the ipmi_si module on a powerpc with no BMC (baseboard management controller) the driver failes to load correctly, but doesn't unregister itself from of_platform. So, on a second modprobe the kernel crashes. This patch adds the missing unregister call. Signed-off-by: Christian Krafft Signed-off-by: Corey Minyard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 4769cc26880..78e1b962fe3 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -2974,6 +2974,10 @@ static __devinit int init_ipmi_si(void) #ifdef CONFIG_PCI pci_unregister_driver(&ipmi_pci_driver); #endif + +#ifdef CONFIG_PPC_OF + of_unregister_platform_driver(&ipmi_of_platform_driver); +#endif driver_unregister(&ipmi_driver); printk("ipmi_si: Unable to find any System Interface(s)\n"); return -ENODEV;