From: Tobias Klauser <tklauser@distanz.ch>
To: Greg Kroah-Hartman <gregkh@suse.de>, linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] tty: serial: altera_uart: add devicetree support
Date: Tue, 25 Jan 2011 15:57:37 +0100 [thread overview]
Message-ID: <1295967457-11876-1-git-send-email-tklauser@distanz.ch> (raw)
In-Reply-To: <1295966417-11306-1-git-send-email-tklauser@distanz.ch>
Allow to retreive resources from a device tree (currently used in the
out-of-tree nios2 architecture port only).
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
drivers/tty/serial/altera_uart.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/altera_uart.c b/drivers/tty/serial/altera_uart.c
index 7212162..bde59d1 100644
--- a/drivers/tty/serial/altera_uart.c
+++ b/drivers/tty/serial/altera_uart.c
@@ -567,13 +567,23 @@ static int __devexit altera_uart_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_OF
+static struct of_device_id altera_uart_match[] = {
+ { .compatible = "altr,uart-1.0", },
+ {},
+};
+MODULE_DEVICE_TABLE(of, altera_uart_match);
+#endif /* CONFIG_OF */
+
static struct platform_driver altera_uart_platform_driver = {
.probe = altera_uart_probe,
.remove = __devexit_p(altera_uart_remove),
.driver = {
- .name = DRV_NAME,
- .owner = THIS_MODULE,
- .pm = NULL,
+ .name = DRV_NAME,
+ .owner = THIS_MODULE,
+#ifdef CONFIG_OF
+ .of_match_table = altera_uart_match,
+#endif
},
};
--
1.7.0.4
next prev parent reply other threads:[~2011-01-25 14:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-25 14:40 [PATCH 1/2] tty: serial: altera_uart: remove early_altera_uart_setup Tobias Klauser
2011-01-25 14:57 ` Tobias Klauser [this message]
2011-01-26 18:18 ` [PATCH 2/2] tty: serial: altera_uart: add devicetree support Tobias Klauser
2011-01-25 16:27 ` [PATCH 1/2] tty: serial: altera_uart: remove early_altera_uart_setup Anton Vorontsov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1295967457-11876-1-git-send-email-tklauser@distanz.ch \
--to=tklauser@distanz.ch \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).