diff options
author | Richard Fitzgerald <rf@opensource.wolfsonmicro.com> | 2015-10-02 14:29:15 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2015-10-30 18:20:30 +0100 |
commit | 2e44e28ad2628cd29a4829ffab06fe7e3b79469c (patch) | |
tree | 9735e103f5685ec5c0787d7377b1caaacc6002da /drivers/mfd/arizona-spi.c | |
parent | mfd: arizona: Remove use of codec build config #ifdefs (diff) | |
download | linux-2e44e28ad2628cd29a4829ffab06fe7e3b79469c.tar.xz linux-2e44e28ad2628cd29a4829ffab06fe7e3b79469c.zip |
mfd: arizona: Use correct type ID for device tree config
In the case of a device tree config the code uses the device ID
from the DT entry to check which codec is required but when storing
the ID into struct arizona it was always using the non-DT SPI device
table to get an ID.
This patch changes the code to store the correct ID into struct arizona.
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/mfd/arizona-spi.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mfd/arizona-spi.c b/drivers/mfd/arizona-spi.c index 850a63a3235e..8cffb1cfe73d 100644 --- a/drivers/mfd/arizona-spi.c +++ b/drivers/mfd/arizona-spi.c @@ -47,8 +47,7 @@ static int arizona_spi_probe(struct spi_device *spi) regmap_config = &wm5110_spi_regmap; break; default: - dev_err(&spi->dev, "Unknown device type %ld\n", - id->driver_data); + dev_err(&spi->dev, "Unknown device type %ld\n", type); return -EINVAL; } @@ -70,7 +69,7 @@ static int arizona_spi_probe(struct spi_device *spi) return ret; } - arizona->type = id->driver_data; + arizona->type = type; arizona->dev = &spi->dev; arizona->irq = spi->irq; |