Skip to contentSkip to conversation

ASoC: adav80x: Add module device table for adav801

PATCH Applied Axel Lin 3 participants 3 messages Jul 1, 2013 – Jul 2, 2013

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ASoC: adav80x: Add module device table for adav801

This driver can be built as module, thus add module device table for adav801 to support module auto loading.

To make the naming consistent, also rename adav80x_id to adav80x_i2c_id.

---
 sound/soc/codecs/adav80x.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
sound/soc/codecs/adav80x.c +10 -3
index 3c839cc..15b012d0 100644
@@ -868,6 +868,12 @@ static int adav80x_bus_remove(struct device *dev)
 }
 
 #if defined(CONFIG_SPI_MASTER)
+static const struct spi_device_id adav80x_spi_id[] = {
+	{ "adav801", 0 },
+	{ }
+};
+MODULE_DEVICE_TABLE(spi, adav80x_spi_id);
+
 static int adav80x_spi_probe(struct spi_device *spi)
 {
 	return adav80x_bus_probe(&spi->dev, SND_SOC_SPI);
@@ -885,15 +891,16 @@ static struct spi_driver adav80x_spi_driver = {
 	},
 	.probe		= adav80x_spi_probe,
 	.remove		= adav80x_spi_remove,
+	.id_table	= adav80x_spi_id,
 };
 #endif
 
 #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
-static const struct i2c_device_id adav80x_id[] = {
+static const struct i2c_device_id adav80x_i2c_id[] = {
 	{ "adav803", 0 },
 	{ }
 };
-MODULE_DEVICE_TABLE(i2c, adav80x_id);
+MODULE_DEVICE_TABLE(i2c, adav80x_i2c_id);
 
 static int adav80x_i2c_probe(struct i2c_client *client,
 			     const struct i2c_device_id *id)
@@ -913,7 +920,7 @@ static struct i2c_driver adav80x_i2c_driver = {
 	},
 	.probe = adav80x_i2c_probe,
 	.remove = adav80x_i2c_remove,
-	.id_table = adav80x_id,
+	.id_table = adav80x_i2c_id,
 };
 #endif
 
Signature · 1 line
1.8.1.2
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Axel Lin

This driver can be built as module, thus add module device table for adav801 to support module auto loading.

To make the naming consistent, also rename adav80x_id to adav80x_i2c_id.

Quoted 27 lines

--- sound/soc/codecs/adav80x.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)

sound/soc/codecs/adav80x.c index renamed from sound/soc/codecs/adav80x.c +0 -0

3c839cc..15b012d0 100644 --- a/sound/soc/codecs/adav80x.c +++ b/sound/soc/codecs/adav80x.c @@ -868,6 +868,12 @@ static int adav80x_bus_remove(struct device *dev) }

#if defined(CONFIG_SPI_MASTER) +static const struct spi_device_id
adav80x_spi_id[] = { + { "adav801", 0 }, + { } +};
+MODULE_DEVICE_TABLE(spi, adav80x_spi_id); + static int adav80x_spi_probe(struct spi_device *spi) { return adav80x_bus_probe(&spi->dev, SND_SOC_SPI); @@ -885,15 +891,16 @@ static
struct spi_driver adav80x_spi_driver = { }, .probe = adav80x_spi_probe,
.remove = adav80x_spi_remove, + .id_table = adav80x_spi_id, }; #endif

#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) -static const struct i2c_device_id adav80x_id[] = { +static const struct i2c_device_id adav80x_i2c_id[] = { { "adav803", 0 }, { } }; -MODULE_DEVICE_TABLE(i2c, adav80x_id); +MODULE_DEVICE_TABLE(i2c, adav80x_i2c_id);

static int adav80x_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) @@ -913,7 +920,7 @@ static struct i2c_driver adav80x_i2c_driver = { }, .probe = adav80x_i2c_probe, .remove =
adav80x_i2c_remove, - .id_table = adav80x_id, + .id_table =
adav80x_i2c_id, }; #endif

maintainer Applied
#2 lore raw
In reply to Axel Lin
Quoted 2 lines · Axel Lin

This driver can be built as module, thus add module device table for adav801 to support module auto loading.

Applied, thanks.