Skip to content

Commit 33883ee

Browse files
D Scott Phillipsbjorn-helgaas
authored andcommitted
PCI: acpiphp: Allow built-in drivers for Attention Indicators
Since the introduction of the attention callback in acpiphp, a non-zero struct module *owner has been required in acpiphp_register_attention(). The intent seemed to be that the core code could hold a refcount on the module while invoking a callback. This check accidentally precludes the possibility of attention callbacks to built-in drivers. Remove the check on `struct module *owner` in acpiphp_register_attention() so attention callbacks can also be registered from built-in drivers. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: D Scott Phillips <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 0bb80ec commit 33883ee

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/pci/hotplug/acpiphp_core.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ int acpiphp_register_attention(struct acpiphp_attention_info *info)
7878
{
7979
int retval = -EINVAL;
8080

81-
if (info && info->owner && info->set_attn &&
82-
info->get_attn && !attention_info) {
81+
if (info && info->set_attn && info->get_attn && !attention_info) {
8382
retval = 0;
8483
attention_info = info;
8584
}

0 commit comments

Comments
 (0)