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

tty: serial: altera_jtaguart: Add device tree support

Advertise the possibility to use this driver with device tree if
CONFIG_OF is set.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>

authored by

Tobias Klauser and committed by
Grant Likely
9f15444f 7c9325d7

+17 -2
+4
Documentation/devicetree/bindings/serial/altera_jtaguart.txt
··· 1 + Altera JTAG UART 2 + 3 + Required properties: 4 + - compatible : should be "ALTR,juart-1.0"
+13 -2
drivers/tty/serial/altera_jtaguart.c
··· 465 465 return 0; 466 466 } 467 467 468 + #ifdef CONFIG_OF 469 + static struct of_device_id altera_jtaguart_match[] = { 470 + { .compatible = "ALTR,juart-1.0", }, 471 + {}, 472 + }; 473 + MODULE_DEVICE_TABLE(of, altera_jtaguart_match); 474 + #else 475 + #define altera_jtaguart_match NULL 476 + #endif /* CONFIG_OF */ 477 + 468 478 static struct platform_driver altera_jtaguart_platform_driver = { 469 479 .probe = altera_jtaguart_probe, 470 480 .remove = __devexit_p(altera_jtaguart_remove), 471 481 .driver = { 472 - .name = DRV_NAME, 473 - .owner = THIS_MODULE, 482 + .name = DRV_NAME, 483 + .owner = THIS_MODULE, 484 + .of_match_table = altera_jtaguart_match, 474 485 }, 475 486 }; 476 487