aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2018-03-01 06:41:29 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-09 13:24:38 -0500
commit7d6e2143bed7dd61dac3a00321292b36d63c2a2f (patch)
tree7d33dffef7d8755d126b2f161b7be3ea44097b26
parent9d1a50a2cceb3a8589531f7a2652f1a478df8907 (diff)
serial: 8250_dw: Switch to use acpi_dev_present()
Special settings for APMC0D08 are applied when device is present in the system. To check its presence we may use acpi_dev_present() instead of current open coded variant. Cc: Feng Kan <fkan@apm.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/8250/8250_dw.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index 41618b780146..6fcdb90f616a 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -357,17 +357,11 @@ static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data)
357 p->serial_in = dw8250_serial_in32be; 357 p->serial_in = dw8250_serial_in32be;
358 p->serial_out = dw8250_serial_out32be; 358 p->serial_out = dw8250_serial_out32be;
359 } 359 }
360 } else if (has_acpi_companion(p->dev)) { 360 } else if (acpi_dev_present("APMC0D08", NULL, -1)) {
361 const struct acpi_device_id *id; 361 p->iotype = UPIO_MEM32;
362 362 p->regshift = 2;
363 id = acpi_match_device(p->dev->driver->acpi_match_table, 363 p->serial_in = dw8250_serial_in32;
364 p->dev); 364 data->uart_16550_compatible = true;
365 if (id && !strcmp(id->id, "APMC0D08")) {
366 p->iotype = UPIO_MEM32;
367 p->regshift = 2;
368 p->serial_in = dw8250_serial_in32;
369 data->uart_16550_compatible = true;
370 }
371 } 365 }
372 366
373 /* Platforms with iDMA */ 367 /* Platforms with iDMA */