summaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@osg.samsung.com>2016-10-12 20:55:40 +0200
committerDavid S. Miller <davem@davemloft.net>2016-10-14 16:11:48 +0200
commit558c5eb58a5c029745b29558782d528b05aba8a5 (patch)
treee1e125350742e48928c8a5e8f47362df8fee9bf1 /drivers/net/wan
parentipv6: correctly add local routes when lo goes up (diff)
downloadlinux-558c5eb58a5c029745b29558782d528b05aba8a5.tar.xz
linux-558c5eb58a5c029745b29558782d528b05aba8a5.zip
net: wan: slic_ds26522: add SPI device ID table to fix module autoload
If the driver is built as a module, module alias information isn't filled so the module won't be autoloaded. Add a SPI device ID table and use the MODULE_DEVICE_TABLE() macro so the information is exported in the module. Before this patch: $ modinfo drivers/net/wan/slic_ds26522.ko | grep alias $ After this patch: $ modinfo drivers/net/wan/slic_ds26522.ko | grep alias alias: spi:ds26522 Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/slic_ds26522.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wan/slic_ds26522.c b/drivers/net/wan/slic_ds26522.c
index d06a887a2352..53366a2232f0 100644
--- a/drivers/net/wan/slic_ds26522.c
+++ b/drivers/net/wan/slic_ds26522.c
@@ -223,6 +223,12 @@ static int slic_ds26522_probe(struct spi_device *spi)
return ret;
}
+static const struct spi_device_id slic_ds26522_id[] = {
+ { .name = "ds26522" },
+ { /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(spi, slic_ds26522_id);
+
static const struct of_device_id slic_ds26522_match[] = {
{
.compatible = "maxim,ds26522",
@@ -239,6 +245,7 @@ static struct spi_driver slic_ds26522_driver = {
},
.probe = slic_ds26522_probe,
.remove = slic_ds26522_remove,
+ .id_table = slic_ds26522_id,
};
static int __init slic_ds26522_init(void)