diff options
author | Sebastian Reichel <sre@debian.org> | 2013-09-20 18:11:16 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@debian.org> | 2013-10-12 23:53:20 +0200 |
commit | 5330a906f61839255a08d10b33749f79c335b7ed (patch) | |
tree | 3d5990b07b40fc85fad30f6c4ed1baf0b258611c | |
parent | b34eef4cfe213311f754c7aed80a57f01a5230aa (diff) | |
download | linux-5330a906f61839255a08d10b33749f79c335b7ed.tar.bz2 |
HSI: hsi-char: add Device Tree support
Add of_match_table to hsi_char driver, so that it can
be referenced from Device Tree.
Signed-off-by: Sebastian Reichel <sre@debian.org>
-rw-r--r-- | drivers/hsi/clients/hsi_char.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/hsi/clients/hsi_char.c b/drivers/hsi/clients/hsi_char.c index e61e5f991aa5..e3302ed158e3 100644 --- a/drivers/hsi/clients/hsi_char.c +++ b/drivers/hsi/clients/hsi_char.c @@ -42,6 +42,7 @@ #include <linux/stat.h> #include <linux/hsi/hsi.h> #include <linux/hsi/hsi_char.h> +#include <linux/of_device.h> #define HSC_DEVS 16 /* Num of channels */ #define HSC_MSGS 4 @@ -758,12 +759,24 @@ static int hsc_remove(struct device *dev) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id hsi_char_of_match[] = { + { .compatible = "ssi-char", }, + { .compatible = "hsi-char", }, + {}, +}; +MODULE_DEVICE_TABLE(of, hsi_char_of_match); +#else +#define hsi_char_of_match NULL +#endif + static struct hsi_client_driver hsc_driver = { .driver = { .name = "hsi_char", .owner = THIS_MODULE, .probe = hsc_probe, .remove = hsc_remove, + .of_match_table = hsi_char_of_match, }, }; |