diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2011-02-18 08:10:01 (GMT) |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-03-01 16:38:27 (GMT) |
commit | 9f15444fefdb33509132ff5c9be60cb315c44cb2 (patch) | |
tree | a927896fe789a01bf4e885d1d2ceb32677b0b07c /drivers/tty/serial/altera_jtaguart.c | |
parent | 7c9325d79a3c3d51c98812161d47876d6830c062 (diff) | |
download | linux-fsl-qoriq-9f15444fefdb33509132ff5c9be60cb315c44cb2.tar.xz |
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>
Diffstat (limited to 'drivers/tty/serial/altera_jtaguart.c')
-rw-r--r-- | drivers/tty/serial/altera_jtaguart.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c index f9b49b5..a20927f 100644 --- a/drivers/tty/serial/altera_jtaguart.c +++ b/drivers/tty/serial/altera_jtaguart.c @@ -465,12 +465,23 @@ static int __devexit altera_jtaguart_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_OF +static struct of_device_id altera_jtaguart_match[] = { + { .compatible = "ALTR,juart-1.0", }, + {}, +}; +MODULE_DEVICE_TABLE(of, altera_jtaguart_match); +#else +#define altera_jtaguart_match NULL +#endif /* CONFIG_OF */ + static struct platform_driver altera_jtaguart_platform_driver = { .probe = altera_jtaguart_probe, .remove = __devexit_p(altera_jtaguart_remove), .driver = { - .name = DRV_NAME, - .owner = THIS_MODULE, + .name = DRV_NAME, + .owner = THIS_MODULE, + .of_match_table = altera_jtaguart_match, }, }; |