aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-04 20:10:06 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-04 20:10:06 -0500
commita5939eefdcacd3ece57d56167a43bcc0d93733bf (patch)
treef3a11477ce45acde4db4ff4ba673cd5a85e573f9 /drivers
parent5483f18e986ed5267b923bec12b407845181350b (diff)
parentac5ff1b358ab6813654fea69e739bf0a66c1b002 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
MFD fixes from Samuel Ortiz: "This is the pull request for the MFD fixes for 3.3. We have a few NULL pointer dereferences fixes, an ACPI conflict check fix, and a couple of wm8994 fixes." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: mfd: Correct readability of WM8994 DC servo 4E register mfd: Initialize tps65912 irq platform data properly mfd: Fix ACPI conflict check mfd: Fix ab8500 error path bug mfd: Test for jack detection when deciding if wm8994 should suspend mfd: Initialize tps65910 irq platform data properly mfd: Fix possible s5m null pointer dereference mfd: wm8350 variable dereferenced before check
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mfd/ab8500-core.c5
-rw-r--r--drivers/mfd/mfd-core.c2
-rw-r--r--drivers/mfd/s5m-core.c2
-rw-r--r--drivers/mfd/tps65910.c2
-rw-r--r--drivers/mfd/tps65912-core.c2
-rw-r--r--drivers/mfd/wm8350-irq.c1
-rw-r--r--drivers/mfd/wm8994-core.c14
-rw-r--r--drivers/mfd/wm8994-regmap.c1
8 files changed, 22 insertions, 7 deletions
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index 53e2a80f42fa..d295941c9a3d 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -956,11 +956,12 @@ int __devinit ab8500_init(struct ab8500 *ab8500)
956 return ret; 956 return ret;
957 957
958out_freeirq: 958out_freeirq:
959 if (ab8500->irq_base) { 959 if (ab8500->irq_base)
960 free_irq(ab8500->irq, ab8500); 960 free_irq(ab8500->irq, ab8500);
961out_removeirq: 961out_removeirq:
962 if (ab8500->irq_base)
962 ab8500_irq_remove(ab8500); 963 ab8500_irq_remove(ab8500);
963 } 964
964 return ret; 965 return ret;
965} 966}
966 967
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index 0f5922812bff..411f523d4878 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -123,7 +123,7 @@ static int mfd_add_device(struct device *parent, int id,
123 } 123 }
124 124
125 if (!cell->ignore_resource_conflicts) { 125 if (!cell->ignore_resource_conflicts) {
126 ret = acpi_check_resource_conflict(res); 126 ret = acpi_check_resource_conflict(&res[r]);
127 if (ret) 127 if (ret)
128 goto fail_res; 128 goto fail_res;
129 } 129 }
diff --git a/drivers/mfd/s5m-core.c b/drivers/mfd/s5m-core.c
index e075c113eec6..caadabeed8e9 100644
--- a/drivers/mfd/s5m-core.c
+++ b/drivers/mfd/s5m-core.c
@@ -105,7 +105,7 @@ static int s5m87xx_i2c_probe(struct i2c_client *i2c,
105 s5m87xx->rtc = i2c_new_dummy(i2c->adapter, RTC_I2C_ADDR); 105 s5m87xx->rtc = i2c_new_dummy(i2c->adapter, RTC_I2C_ADDR);
106 i2c_set_clientdata(s5m87xx->rtc, s5m87xx); 106 i2c_set_clientdata(s5m87xx->rtc, s5m87xx);
107 107
108 if (pdata->cfg_pmic_irq) 108 if (pdata && pdata->cfg_pmic_irq)
109 pdata->cfg_pmic_irq(); 109 pdata->cfg_pmic_irq();
110 110
111 s5m_irq_init(s5m87xx); 111 s5m_irq_init(s5m87xx);
diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
index 01cf5012a08f..4392f6bca156 100644
--- a/drivers/mfd/tps65910.c
+++ b/drivers/mfd/tps65910.c
@@ -168,7 +168,7 @@ static int tps65910_i2c_probe(struct i2c_client *i2c,
168 goto err; 168 goto err;
169 169
170 init_data->irq = pmic_plat_data->irq; 170 init_data->irq = pmic_plat_data->irq;
171 init_data->irq_base = pmic_plat_data->irq; 171 init_data->irq_base = pmic_plat_data->irq_base;
172 172
173 tps65910_gpio_init(tps65910, pmic_plat_data->gpio_base); 173 tps65910_gpio_init(tps65910, pmic_plat_data->gpio_base);
174 174
diff --git a/drivers/mfd/tps65912-core.c b/drivers/mfd/tps65912-core.c
index 5fec23a9ac03..74fd8cb5f372 100644
--- a/drivers/mfd/tps65912-core.c
+++ b/drivers/mfd/tps65912-core.c
@@ -151,7 +151,7 @@ int tps65912_device_init(struct tps65912 *tps65912)
151 goto err; 151 goto err;
152 152
153 init_data->irq = pmic_plat_data->irq; 153 init_data->irq = pmic_plat_data->irq;
154 init_data->irq_base = pmic_plat_data->irq; 154 init_data->irq_base = pmic_plat_data->irq_base;
155 ret = tps65912_irq_init(tps65912, init_data->irq, init_data); 155 ret = tps65912_irq_init(tps65912, init_data->irq, init_data);
156 if (ret < 0) 156 if (ret < 0)
157 goto err; 157 goto err;
diff --git a/drivers/mfd/wm8350-irq.c b/drivers/mfd/wm8350-irq.c
index 8a1fafd0bf7d..9fd01bf63c51 100644
--- a/drivers/mfd/wm8350-irq.c
+++ b/drivers/mfd/wm8350-irq.c
@@ -496,7 +496,6 @@ int wm8350_irq_init(struct wm8350 *wm8350, int irq,
496 496
497 mutex_init(&wm8350->irq_lock); 497 mutex_init(&wm8350->irq_lock);
498 wm8350->chip_irq = irq; 498 wm8350->chip_irq = irq;
499 wm8350->irq_base = pdata->irq_base;
500 499
501 if (pdata && pdata->irq_base > 0) 500 if (pdata && pdata->irq_base > 0)
502 irq_base = pdata->irq_base; 501 irq_base = pdata->irq_base;
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index f117e7fb9321..a04b3c108c8c 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -256,6 +256,20 @@ static int wm8994_suspend(struct device *dev)
256 break; 256 break;
257 } 257 }
258 258
259 switch (wm8994->type) {
260 case WM1811:
261 ret = wm8994_reg_read(wm8994, WM8994_ANTIPOP_2);
262 if (ret < 0) {
263 dev_err(dev, "Failed to read jackdet: %d\n", ret);
264 } else if (ret & WM1811_JACKDET_MODE_MASK) {
265 dev_dbg(dev, "CODEC still active, ignoring suspend\n");
266 return 0;
267 }
268 break;
269 default:
270 break;
271 }
272
259 /* Disable LDO pulldowns while the device is suspended if we 273 /* Disable LDO pulldowns while the device is suspended if we
260 * don't know that something will be driving them. */ 274 * don't know that something will be driving them. */
261 if (!wm8994->ldo_ena_always_driven) 275 if (!wm8994->ldo_ena_always_driven)
diff --git a/drivers/mfd/wm8994-regmap.c b/drivers/mfd/wm8994-regmap.c
index c598ae69b8ff..bc0c5096539a 100644
--- a/drivers/mfd/wm8994-regmap.c
+++ b/drivers/mfd/wm8994-regmap.c
@@ -806,6 +806,7 @@ static bool wm1811_readable_register(struct device *dev, unsigned int reg)
806 case WM8994_DC_SERVO_2: 806 case WM8994_DC_SERVO_2:
807 case WM8994_DC_SERVO_READBACK: 807 case WM8994_DC_SERVO_READBACK:
808 case WM8994_DC_SERVO_4: 808 case WM8994_DC_SERVO_4:
809 case WM8994_DC_SERVO_4E:
809 case WM8994_ANALOGUE_HP_1: 810 case WM8994_ANALOGUE_HP_1:
810 case WM8958_MIC_DETECT_1: 811 case WM8958_MIC_DETECT_1:
811 case WM8958_MIC_DETECT_2: 812 case WM8958_MIC_DETECT_2: