]>
Commit | Line | Data |
---|---|---|
1dc68eea GKH |
1 | From abe81f3b8ed2996e1712d26d38ff6b73f582c616 Mon Sep 17 00:00:00 2001 |
2 | From: Javier Martinez Canillas <javier@osg.samsung.com> | |
3 | Date: Mon, 2 Jan 2017 11:57:20 -0300 | |
4 | Subject: tty: serial: msm: Fix module autoload | |
5 | ||
6 | From: Javier Martinez Canillas <javier@osg.samsung.com> | |
7 | ||
8 | commit abe81f3b8ed2996e1712d26d38ff6b73f582c616 upstream. | |
9 | ||
10 | If the driver is built as a module, autoload won't work because the module | |
11 | alias information is not filled. So user-space can't match the registered | |
12 | device with the corresponding module. | |
13 | ||
14 | Export the module alias information using the MODULE_DEVICE_TABLE() macro. | |
15 | ||
16 | Before this patch: | |
17 | ||
18 | $ modinfo drivers/tty/serial/msm_serial.ko | grep alias | |
19 | $ | |
20 | ||
21 | After this patch: | |
22 | ||
23 | $ modinfo drivers/tty/serial/msm_serial.ko | grep alias | |
24 | alias: of:N*T*Cqcom,msm-uartdmC* | |
25 | alias: of:N*T*Cqcom,msm-uartdm | |
26 | alias: of:N*T*Cqcom,msm-uartC* | |
27 | alias: of:N*T*Cqcom,msm-uart | |
28 | ||
29 | Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> | |
30 | Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> | |
31 | Cc: stable <stable@vger.kernel.org> | |
32 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
33 | Signed-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, |