]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.9.13/tty-serial-msm-fix-module-autoload.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.9.13 / tty-serial-msm-fix-module-autoload.patch
CommitLineData
1dc68eea
GKH
1From abe81f3b8ed2996e1712d26d38ff6b73f582c616 Mon Sep 17 00:00:00 2001
2From: Javier Martinez Canillas <javier@osg.samsung.com>
3Date: Mon, 2 Jan 2017 11:57:20 -0300
4Subject: tty: serial: msm: Fix module autoload
5
6From: Javier Martinez Canillas <javier@osg.samsung.com>
7
8commit abe81f3b8ed2996e1712d26d38ff6b73f582c616 upstream.
9
10If the driver is built as a module, autoload won't work because the module
11alias information is not filled. So user-space can't match the registered
12device with the corresponding module.
13
14Export the module alias information using the MODULE_DEVICE_TABLE() macro.
15
16Before this patch:
17
18$ modinfo drivers/tty/serial/msm_serial.ko | grep alias
19$
20
21After this patch:
22
23$ modinfo drivers/tty/serial/msm_serial.ko | grep alias
24alias: of:N*T*Cqcom,msm-uartdmC*
25alias: of:N*T*Cqcom,msm-uartdm
26alias: of:N*T*Cqcom,msm-uartC*
27alias: of:N*T*Cqcom,msm-uart
28
29Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
30Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
31Cc: stable <stable@vger.kernel.org>
32Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
33Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
34
35---
36 drivers/tty/serial/msm_serial.c | 1 +
37 1 file changed, 1 insertion(+)
38
39--- a/drivers/tty/serial/msm_serial.c
40+++ b/drivers/tty/serial/msm_serial.c
41@@ -1809,6 +1809,7 @@ static const struct of_device_id msm_mat
42 { .compatible = "qcom,msm-uartdm" },
43 {}
44 };
45+MODULE_DEVICE_TABLE(of, msm_match_table);
46
47 static struct platform_driver msm_platform_driver = {
48 .remove = msm_serial_remove,