Skip to content

Commit cd16044

Browse files
wojtas-marcingregkh
authored andcommitted
serial: 8250: dw: enable using pdata with ACPI
Commit ffd3814 ("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: ffd3814 ("serial: 8250: dw: Move the USR register to pdata") Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Link: https://lore.kernel.org/r/20220620121046.1307412-1-mw@semihalf.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a111daf commit cd16044

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

drivers/tty/serial/8250/8250_dw.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -773,18 +773,18 @@ static const struct of_device_id dw8250_of_match[] = {
773773
MODULE_DEVICE_TABLE(of, dw8250_of_match);
774774

775775
static const struct acpi_device_id dw8250_acpi_match[] = {
776-
{ "INT33C4", 0 },
777-
{ "INT33C5", 0 },
778-
{ "INT3434", 0 },
779-
{ "INT3435", 0 },
780-
{ "80860F0A", 0 },
781-
{ "8086228A", 0 },
782-
{ "APMC0D08", 0},
783-
{ "AMD0020", 0 },
784-
{ "AMDI0020", 0 },
785-
{ "AMDI0022", 0 },
786-
{ "BRCM2032", 0 },
787-
{ "HISI0031", 0 },
776+
{ "80860F0A", (kernel_ulong_t)&dw8250_dw_apb },
777+
{ "8086228A", (kernel_ulong_t)&dw8250_dw_apb },
778+
{ "AMD0020", (kernel_ulong_t)&dw8250_dw_apb },
779+
{ "AMDI0020", (kernel_ulong_t)&dw8250_dw_apb },
780+
{ "AMDI0022", (kernel_ulong_t)&dw8250_dw_apb },
781+
{ "APMC0D08", (kernel_ulong_t)&dw8250_dw_apb},
782+
{ "BRCM2032", (kernel_ulong_t)&dw8250_dw_apb },
783+
{ "HISI0031", (kernel_ulong_t)&dw8250_dw_apb },
784+
{ "INT33C4", (kernel_ulong_t)&dw8250_dw_apb },
785+
{ "INT33C5", (kernel_ulong_t)&dw8250_dw_apb },
786+
{ "INT3434", (kernel_ulong_t)&dw8250_dw_apb },
787+
{ "INT3435", (kernel_ulong_t)&dw8250_dw_apb },
788788
{ },
789789
};
790790
MODULE_DEVICE_TABLE(acpi, dw8250_acpi_match);

0 commit comments

Comments
 (0)