[alsa-devel] [PATCH] ASoC: Fix SPI driver binding for WM8987
As we had no id_table only the driver name would be matched against meaning that WM8987 devices wouldn't be bound.
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/codecs/wm8750.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c index 6cbf51b..2bb7bea 100644 --- a/sound/soc/codecs/wm8750.c +++ b/sound/soc/codecs/wm8750.c @@ -779,11 +779,18 @@ static int __devexit wm8750_spi_remove(struct spi_device *spi) return 0; }
+static const struct spi_device_id wm8750_spi_ids[] = { + { "wm8750", 0 }, + { "wm8987", 0 }, +}; +MODULE_DEVICE_TABLE(spi, wm8750_spi_id); + static struct spi_driver wm8750_spi_driver = { .driver = { - .name = "wm8750-codec", + .name = "wm8750", .owner = THIS_MODULE, }, + .id_table = wm8750_spi_ids, .probe = wm8750_spi_probe, .remove = __devexit_p(wm8750_spi_remove), };
On 03/08/11 10:11, Mark Brown wrote:
As we had no id_table only the driver name would be matched against meaning that WM8987 devices wouldn't be bound.
Subject line is for wrong codec but otherwise (with new subject line)
Acked-by: Liam Girdwood lrg@ti.com
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com
sound/soc/codecs/wm8750.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c index 6cbf51b..2bb7bea 100644 --- a/sound/soc/codecs/wm8750.c +++ b/sound/soc/codecs/wm8750.c @@ -779,11 +779,18 @@ static int __devexit wm8750_spi_remove(struct spi_device *spi) return 0; }
+static const struct spi_device_id wm8750_spi_ids[] = {
- { "wm8750", 0 },
- { "wm8987", 0 },
+}; +MODULE_DEVICE_TABLE(spi, wm8750_spi_id);
static struct spi_driver wm8750_spi_driver = { .driver = {
.name = "wm8750-codec",
.owner = THIS_MODULE, },.name = "wm8750",
- .id_table = wm8750_spi_ids, .probe = wm8750_spi_probe, .remove = __devexit_p(wm8750_spi_remove),
};
On Tue, Aug 09, 2011 at 01:17:02PM +0100, Liam Girdwood wrote:
On 03/08/11 10:11, Mark Brown wrote:
As we had no id_table only the driver name would be matched against meaning that WM8987 devices wouldn't be bound.
Subject line is for wrong codec but otherwise (with new subject line)
Hrm? Subject line says WM8987...
On 09/08/11 16:05, Mark Brown wrote:
On Tue, Aug 09, 2011 at 01:17:02PM +0100, Liam Girdwood wrote:
On 03/08/11 10:11, Mark Brown wrote:
As we had no id_table only the driver name would be matched against meaning that WM8987 devices wouldn't be bound.
Subject line is for wrong codec but otherwise (with new subject line)
Hrm? Subject line says WM8987...
But the diff said WM8750 iirc.
Liam
On Tue, Aug 09, 2011 at 04:28:04PM +0100, Liam Girdwood wrote:
On 09/08/11 16:05, Mark Brown wrote:
Hrm? Subject line says WM8987...
But the diff said WM8750 iirc.
The issue being fixed is that the two devices are register compatible but for SPI we were only registering a device ID for wm8750, for I2C we'd got both IDs registered. The driver says wm8750 everywhere except the device IDs.
On 09/08/11 16:31, Mark Brown wrote:
On Tue, Aug 09, 2011 at 04:28:04PM +0100, Liam Girdwood wrote:
On 09/08/11 16:05, Mark Brown wrote:
Hrm? Subject line says WM8987...
But the diff said WM8750 iirc.
The issue being fixed is that the two devices are register compatible but for SPI we were only registering a device ID for wm8750, for I2C we'd got both IDs registered. The driver says wm8750 everywhere except the device IDs.
Ah, ok - I would have just used WM8750 in subject instead.
Acked-by: Liam Girdwood lrg@ti.com
participants (2)
-
Liam Girdwood
-
Mark Brown