diff options
author | D Scott Phillips <scott@os.amperecomputing.com> | 2023-09-30 02:20:35 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2023-10-25 20:05:37 +0200 |
commit | 33883eeda456f9ea73f7a2d65e321b3c82fd9294 (patch) | |
tree | e012d670eaf22ec779c665888a34679f8e508503 /drivers/pci/hotplug/acpiphp_core.c | |
parent | Linux 6.6-rc1 (diff) | |
download | linux-33883eeda456f9ea73f7a2d65e321b3c82fd9294.tar.xz linux-33883eeda456f9ea73f7a2d65e321b3c82fd9294.zip |
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>
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_core.c')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/acpiphp_core.c b/drivers/pci/hotplug/acpiphp_core.c index c02257f4b61c..9dad14e80bcf 100644 --- a/drivers/pci/hotplug/acpiphp_core.c +++ b/drivers/pci/hotplug/acpiphp_core.c @@ -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; } |