diff mbox

net: rfkill: gpio: Enable module auto-loading for ACPI based switches

Message ID 1410547842-50207-1-git-send-email-marcel@holtmann.org
State Awaiting Upstream, archived
Delegated to: David Miller
Headers show

Commit Message

Marcel Holtmann Sept. 12, 2014, 6:50 p.m. UTC
The switches that are enumerated over ACPI require a MODULE_ALIAS to
allow auto-loading of the module.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/rfkill/rfkill-gpio.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Marcel Holtmann Sept. 12, 2014, 7:46 p.m. UTC | #1
Hi Johannes,

> The switches that are enumerated over ACPI require a MODULE_ALIAS to
> allow auto-loading of the module.
> 
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> ---
> net/rfkill/rfkill-gpio.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
> 
> diff --git a/net/rfkill/rfkill-gpio.c b/net/rfkill/rfkill-gpio.c
> index 02a86a27fd84..35e659392209 100644
> --- a/net/rfkill/rfkill-gpio.c
> +++ b/net/rfkill/rfkill-gpio.c
> @@ -180,3 +180,12 @@ module_platform_driver(rfkill_gpio_driver);
> MODULE_DESCRIPTION("gpio rfkill");
> MODULE_AUTHOR("NVIDIA");
> MODULE_LICENSE("GPL");
> +
> +#ifdef CONFIG_ACPI
> +MODULE_ALIAS("acpi:BCM2E1A");
> +MODULE_ALIAS("acpi:BCM2E39");
> +MODULE_ALIAS("acpi:BCM2E3D");
> +MODULE_ALIAS("acpi:BCM2E64");
> +MODULE_ALIAS("acpi:BCM4752");
> +MODULE_ALIAS("acpi:LNV4752");
> +#endif

while this patch gets the job done, it is too complicated. We can just use MODULE_DEVICE_TABLE for it. I will send an updated version.

Regards

Marcel


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/rfkill/rfkill-gpio.c b/net/rfkill/rfkill-gpio.c
index 02a86a27fd84..35e659392209 100644
--- a/net/rfkill/rfkill-gpio.c
+++ b/net/rfkill/rfkill-gpio.c
@@ -180,3 +180,12 @@  module_platform_driver(rfkill_gpio_driver);
 MODULE_DESCRIPTION("gpio rfkill");
 MODULE_AUTHOR("NVIDIA");
 MODULE_LICENSE("GPL");
+
+#ifdef CONFIG_ACPI
+MODULE_ALIAS("acpi:BCM2E1A");
+MODULE_ALIAS("acpi:BCM2E39");
+MODULE_ALIAS("acpi:BCM2E3D");
+MODULE_ALIAS("acpi:BCM2E64");
+MODULE_ALIAS("acpi:BCM4752");
+MODULE_ALIAS("acpi:LNV4752");
+#endif