aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi/ipmi_msghandler.c
diff options
context:
space:
mode:
authorCorey Minyard <minyard@acm.org>2006-12-10 05:19:08 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-10 12:55:40 -0500
commit1d5636cc078d3750b7f590a20f748aeaa26e2daf (patch)
tree139a8d4ba0e9b93e1cd67ca31c4677447efe6ef1 /drivers/char/ipmi/ipmi_msghandler.c
parent0c8204b380f92a6a8533d228c50f0b681daf6121 (diff)
[PATCH] IPMI: misc fixes
Fix various problems pointed out by Andrew Morton and others: * platform_device_unregister checks for NULL, no need to check here. * Formatting fixes. * Remove big macro and convert to a function. * Use strcmp instead of defining a broken case-insensitive comparison, and make the output parameter info match the case of the input one (change "I/O" to "i/o"). * Return the length instead of 0 from the hotmod parameter handler. * Remove some unused cruft. * The trydefaults parameter only has to do with scanning the "standard" addresses, don't check for that on ACPI. Signed-off-by: Corey Minyard <cminyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/ipmi/ipmi_msghandler.c')
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index bfcc6a030a16..4e4691a53890 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -2142,8 +2142,7 @@ cleanup_bmc_device(struct kref *ref)
2142 bmc = container_of(ref, struct bmc_device, refcount); 2142 bmc = container_of(ref, struct bmc_device, refcount);
2143 2143
2144 remove_files(bmc); 2144 remove_files(bmc);
2145 if (bmc->dev) 2145 platform_device_unregister(bmc->dev);
2146 platform_device_unregister(bmc->dev);
2147 kfree(bmc); 2146 kfree(bmc);
2148} 2147}
2149 2148
@@ -2341,8 +2340,7 @@ static int ipmi_bmc_register(ipmi_smi_t intf, int ifnum,
2341 2340
2342 while (ipmi_find_bmc_prod_dev_id(&ipmidriver, 2341 while (ipmi_find_bmc_prod_dev_id(&ipmidriver,
2343 bmc->id.product_id, 2342 bmc->id.product_id,
2344 bmc->id.device_id)) 2343 bmc->id.device_id)) {
2345 {
2346 if (!warn_printed) { 2344 if (!warn_printed) {
2347 printk(KERN_WARNING PFX 2345 printk(KERN_WARNING PFX
2348 "This machine has two different BMCs" 2346 "This machine has two different BMCs"