diff options
-rw-r--r-- | drivers/mfd/tps65090.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c index ba1a25d758c1..c3cddb4c3a1a 100644 --- a/drivers/mfd/tps65090.c +++ b/drivers/mfd/tps65090.c | |||
@@ -64,11 +64,16 @@ static struct resource charger_resources[] = { | |||
64 | } | 64 | } |
65 | }; | 65 | }; |
66 | 66 | ||
67 | static const struct mfd_cell tps65090s[] = { | 67 | enum tps65090_cells { |
68 | { | 68 | PMIC = 0, |
69 | CHARGER = 1, | ||
70 | }; | ||
71 | |||
72 | static struct mfd_cell tps65090s[] = { | ||
73 | [PMIC] = { | ||
69 | .name = "tps65090-pmic", | 74 | .name = "tps65090-pmic", |
70 | }, | 75 | }, |
71 | { | 76 | [CHARGER] = { |
72 | .name = "tps65090-charger", | 77 | .name = "tps65090-charger", |
73 | .num_resources = ARRAY_SIZE(charger_resources), | 78 | .num_resources = ARRAY_SIZE(charger_resources), |
74 | .resources = &charger_resources[0], | 79 | .resources = &charger_resources[0], |
@@ -211,6 +216,9 @@ static int tps65090_i2c_probe(struct i2c_client *client, | |||
211 | "IRQ init failed with err: %d\n", ret); | 216 | "IRQ init failed with err: %d\n", ret); |
212 | return ret; | 217 | return ret; |
213 | } | 218 | } |
219 | } else { | ||
220 | /* Don't tell children they have an IRQ that'll never fire */ | ||
221 | tps65090s[CHARGER].num_resources = 0; | ||
214 | } | 222 | } |
215 | 223 | ||
216 | ret = mfd_add_devices(tps65090->dev, -1, tps65090s, | 224 | ret = mfd_add_devices(tps65090->dev, -1, tps65090s, |