提交 cd16044d 编写于 作者: M Marcin Wojtas 提交者: Greg Kroah-Hartman

serial: 8250: dw: enable using pdata with ACPI

Commit ffd38144 ("serial: 8250: dw: Move the USR register to pdata")
caused NULL-pointer dereference when booting with ACPI by unconditional
usage of the recently added pdata.

In order to fix that and prevent similar issues in future, hook the
default version of this structure in dw8250_acpi_match table.
While at it, sort all entries alphabetically.

Fixes: ffd38144 ("serial: 8250: dw: Move the USR register to pdata")
Reviewed-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: NMarcin Wojtas <mw@semihalf.com>
Link: https://lore.kernel.org/r/20220620121046.1307412-1-mw@semihalf.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 a111daf0
...@@ -773,18 +773,18 @@ static const struct of_device_id dw8250_of_match[] = { ...@@ -773,18 +773,18 @@ static const struct of_device_id dw8250_of_match[] = {
MODULE_DEVICE_TABLE(of, dw8250_of_match); MODULE_DEVICE_TABLE(of, dw8250_of_match);
static const struct acpi_device_id dw8250_acpi_match[] = { static const struct acpi_device_id dw8250_acpi_match[] = {
{ "INT33C4", 0 }, { "80860F0A", (kernel_ulong_t)&dw8250_dw_apb },
{ "INT33C5", 0 }, { "8086228A", (kernel_ulong_t)&dw8250_dw_apb },
{ "INT3434", 0 }, { "AMD0020", (kernel_ulong_t)&dw8250_dw_apb },
{ "INT3435", 0 }, { "AMDI0020", (kernel_ulong_t)&dw8250_dw_apb },
{ "80860F0A", 0 }, { "AMDI0022", (kernel_ulong_t)&dw8250_dw_apb },
{ "8086228A", 0 }, { "APMC0D08", (kernel_ulong_t)&dw8250_dw_apb},
{ "APMC0D08", 0}, { "BRCM2032", (kernel_ulong_t)&dw8250_dw_apb },
{ "AMD0020", 0 }, { "HISI0031", (kernel_ulong_t)&dw8250_dw_apb },
{ "AMDI0020", 0 }, { "INT33C4", (kernel_ulong_t)&dw8250_dw_apb },
{ "AMDI0022", 0 }, { "INT33C5", (kernel_ulong_t)&dw8250_dw_apb },
{ "BRCM2032", 0 }, { "INT3434", (kernel_ulong_t)&dw8250_dw_apb },
{ "HISI0031", 0 }, { "INT3435", (kernel_ulong_t)&dw8250_dw_apb },
{ }, { },
}; };
MODULE_DEVICE_TABLE(acpi, dw8250_acpi_match); MODULE_DEVICE_TABLE(acpi, dw8250_acpi_match);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册