Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198790
b: refs/heads/master
c: d8cc526
h: refs/heads/master
v: v3
  • Loading branch information
Matthew Garrett authored and Linus Torvalds committed May 27, 2010
1 parent 64c3e0c commit 7a0f37d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2407d77a1a013b88ee3b817f2b934e420e5376f5
refs/heads/master: d8cc5267b802003e2c67ac5254788044852ccfa9
29 changes: 27 additions & 2 deletions trunk/drivers/char/ipmi/ipmi_si_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -3298,6 +3298,14 @@ static __devinit int init_ipmi_si(void)

hardcode_find_bmc();

/* If the user gave us a device, they presumably want us to use it */
mutex_lock(&smi_infos_lock);
if (!list_empty(&smi_infos)) {
mutex_unlock(&smi_infos_lock);
return 0;
}
mutex_unlock(&smi_infos_lock);

#ifdef CONFIG_DMI
dmi_find_bmc();
#endif
Expand All @@ -3321,10 +3329,27 @@ static __devinit int init_ipmi_si(void)
of_register_platform_driver(&ipmi_of_platform_driver);
#endif

/* Try to register something with interrupts first */

mutex_lock(&smi_infos_lock);
list_for_each_entry(e, &smi_infos, link) {
if (!e->si_sm)
try_smi_init(e);
if (e->irq) {
if (!try_smi_init(e)) {
mutex_unlock(&smi_infos_lock);
return 0;
}
}
}

/* Fall back to the preferred device */

list_for_each_entry(e, &smi_infos, link) {
if (!e->irq) {
if (!try_smi_init(e)) {
mutex_unlock(&smi_infos_lock);
return 0;
}
}
}
mutex_unlock(&smi_infos_lock);

Expand Down

0 comments on commit 7a0f37d

Please sign in to comment.