Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: clps711x: Remove board support

Since board support for the CLPS711X platform was removed
(commit 4a56f46a7dc6 ("ARM: clps711x: Remove boards support")),
remove the board support from the driver.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Alexander Shiyan and committed by
Greg Kroah-Hartman
db4a6cbf bfeffd15

+5 -18
+5 -18
drivers/tty/serial/clps711x.c
··· 442 442 static int uart_clps711x_probe(struct platform_device *pdev) 443 443 { 444 444 struct device_node *np = pdev->dev.of_node; 445 - int ret, index = np ? of_alias_get_id(np, "serial") : pdev->id; 446 445 struct clps711x_port *s; 447 446 struct resource *res; 448 447 struct clk *uart_clk; 449 - int irq; 450 - 451 - if (index < 0 || index >= UART_CLPS711X_NR) 452 - return -EINVAL; 448 + int irq, ret; 453 449 454 450 s = devm_kzalloc(&pdev->dev, sizeof(*s), GFP_KERNEL); 455 451 if (!s) ··· 469 473 if (s->rx_irq < 0) 470 474 return s->rx_irq; 471 475 472 - if (!np) { 473 - char syscon_name[9]; 476 + s->syscon = syscon_regmap_lookup_by_phandle(np, "syscon"); 477 + if (IS_ERR(s->syscon)) 478 + return PTR_ERR(s->syscon); 474 479 475 - sprintf(syscon_name, "syscon.%i", index + 1); 476 - s->syscon = syscon_regmap_lookup_by_pdevname(syscon_name); 477 - if (IS_ERR(s->syscon)) 478 - return PTR_ERR(s->syscon); 479 - } else { 480 - s->syscon = syscon_regmap_lookup_by_phandle(np, "syscon"); 481 - if (IS_ERR(s->syscon)) 482 - return PTR_ERR(s->syscon); 483 - } 484 - 485 - s->port.line = index; 480 + s->port.line = of_alias_get_id(np, "serial"); 486 481 s->port.dev = &pdev->dev; 487 482 s->port.iotype = UPIO_MEM32; 488 483 s->port.mapbase = res->start;