summaryrefslogtreecommitdiff
path: root/drivers/mfd/arizona-spi.c
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.wolfsonmicro.com>2015-10-02 13:29:15 +0100
committerLee Jones <lee.jones@linaro.org>2015-10-30 17:20:30 +0000
commit2e44e28ad2628cd29a4829ffab06fe7e3b79469c (patch)
tree9735e103f5685ec5c0787d7377b1caaacc6002da /drivers/mfd/arizona-spi.c
parentb61c1ec058dabdcbddad7436bb4c009a8fa65b02 (diff)
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 'drivers/mfd/arizona-spi.c')
-rw-r--r--drivers/mfd/arizona-spi.c5
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;