mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
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/20230930002036.6491-1-scott@os.amperecomputing.com Signed-off-by: D Scott Phillips <scott@os.amperecomputing.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
0bb80ecc33
commit
33883eeda4
@ -78,8 +78,7 @@ int acpiphp_register_attention(struct acpiphp_attention_info *info)
|
||||
{
|
||||
int retval = -EINVAL;
|
||||
|
||||
if (info && info->owner && info->set_attn &&
|
||||
info->get_attn && !attention_info) {
|
||||
if (info && info->set_attn && info->get_attn && !attention_info) {
|
||||
retval = 0;
|
||||
attention_info = info;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user