]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: ak4104: provide a module device table
authorDaniel Mack <zonque@gmail.com>
Mon, 16 Sep 2013 16:14:20 +0000 (18:14 +0200)
committerMark Brown <broonie@linaro.org>
Mon, 16 Sep 2013 23:45:16 +0000 (00:45 +0100)
Provide a module device table for the SPI subsystem, so the driver can
be autoloaded by the SPI core.

While at it, get rid of an unnecessary #define.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/ak4104.c

index 71059c07ae7be5abc3a9c70fd5443bce27493ced..b4819dcd4f4dc73f781383681d0ed4198ac2f220 100644 (file)
@@ -45,8 +45,6 @@
 #define AK4104_TX_TXE                  (1 << 0)
 #define AK4104_TX_V                    (1 << 1)
 
-#define DRV_NAME "ak4104-codec"
-
 struct ak4104_private {
        struct regmap *regmap;
 };
@@ -291,12 +289,19 @@ static const struct of_device_id ak4104_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, ak4104_of_match);
 
+static const struct spi_device_id ak4104_id_table[] = {
+       { "ak4104", 0 },
+       { }
+};
+MODULE_DEVICE_TABLE(spi, ak4104_id_table);
+
 static struct spi_driver ak4104_spi_driver = {
        .driver  = {
-               .name   = DRV_NAME,
+               .name   = "ak4104",
                .owner  = THIS_MODULE,
                .of_match_table = ak4104_of_match,
        },
+       .id_table = ak4104_id_table,
        .probe  = ak4104_spi_probe,
        .remove = ak4104_spi_remove,
 };