diff options
| author | Daniel Mack <zonque@gmail.com> | 2013-09-16 12:14:20 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@linaro.org> | 2013-09-16 19:45:16 -0400 |
| commit | 193b2f65b87e9da78b15f3e3a0cae1d37fbafa57 (patch) | |
| tree | 007800787998ea906c65aeb605ef27e107f94214 | |
| parent | 272b98c6455f00884f0350f775c5342358ebb73f (diff) | |
ASoC: ak4104: provide a module device table
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>
| -rw-r--r-- | sound/soc/codecs/ak4104.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sound/soc/codecs/ak4104.c b/sound/soc/codecs/ak4104.c index 71059c07ae7b..b4819dcd4f4d 100644 --- a/sound/soc/codecs/ak4104.c +++ b/sound/soc/codecs/ak4104.c | |||
| @@ -45,8 +45,6 @@ | |||
| 45 | #define AK4104_TX_TXE (1 << 0) | 45 | #define AK4104_TX_TXE (1 << 0) |
| 46 | #define AK4104_TX_V (1 << 1) | 46 | #define AK4104_TX_V (1 << 1) |
| 47 | 47 | ||
| 48 | #define DRV_NAME "ak4104-codec" | ||
| 49 | |||
| 50 | struct ak4104_private { | 48 | struct ak4104_private { |
| 51 | struct regmap *regmap; | 49 | struct regmap *regmap; |
| 52 | }; | 50 | }; |
| @@ -291,12 +289,19 @@ static const struct of_device_id ak4104_of_match[] = { | |||
| 291 | }; | 289 | }; |
| 292 | MODULE_DEVICE_TABLE(of, ak4104_of_match); | 290 | MODULE_DEVICE_TABLE(of, ak4104_of_match); |
| 293 | 291 | ||
| 292 | static const struct spi_device_id ak4104_id_table[] = { | ||
| 293 | { "ak4104", 0 }, | ||
| 294 | { } | ||
| 295 | }; | ||
| 296 | MODULE_DEVICE_TABLE(spi, ak4104_id_table); | ||
| 297 | |||
| 294 | static struct spi_driver ak4104_spi_driver = { | 298 | static struct spi_driver ak4104_spi_driver = { |
| 295 | .driver = { | 299 | .driver = { |
| 296 | .name = DRV_NAME, | 300 | .name = "ak4104", |
| 297 | .owner = THIS_MODULE, | 301 | .owner = THIS_MODULE, |
| 298 | .of_match_table = ak4104_of_match, | 302 | .of_match_table = ak4104_of_match, |
| 299 | }, | 303 | }, |
| 304 | .id_table = ak4104_id_table, | ||
| 300 | .probe = ak4104_spi_probe, | 305 | .probe = ak4104_spi_probe, |
| 301 | .remove = ak4104_spi_remove, | 306 | .remove = ak4104_spi_remove, |
| 302 | }; | 307 | }; |
