aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/ab3550-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-11 08:14:12 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2011-01-14 06:37:52 -0500
commitc91ad349d084f8c034ff60fb56d41a9667f71ae4 (patch)
tree2af4f544e19ef32f7e91f2bbc9bad04a2a4e289c /drivers/mfd/ab3550-core.c
parent0f76aaebe8015d6a850cb03622382bacb7860398 (diff)
mfd: Convert AB3500 to new irq_ APIs
The genirq core is being updated to pass struct irq_data rather than irq numbers into chip drivers. As part of the update assignments to NULL for unused operations are removed, these are not needed and the genirq docs should be good enough. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Mattias Wallin <mattias.wallin@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/ab3550-core.c')
-rw-r--r--drivers/mfd/ab3550-core.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/drivers/mfd/ab3550-core.c b/drivers/mfd/ab3550-core.c
index 8a98739e6d9c..5fbca346b998 100644
--- a/drivers/mfd/ab3550-core.c
+++ b/drivers/mfd/ab3550-core.c
@@ -1159,15 +1159,16 @@ static void ab3550_mask_work(struct work_struct *work)
1159 } 1159 }
1160} 1160}
1161 1161
1162static void ab3550_mask(unsigned int irq) 1162static void ab3550_mask(struct irq_data *data)
1163{ 1163{
1164 unsigned long flags; 1164 unsigned long flags;
1165 struct ab3550 *ab; 1165 struct ab3550 *ab;
1166 struct ab3550_platform_data *plf_data; 1166 struct ab3550_platform_data *plf_data;
1167 int irq;
1167 1168
1168 ab = get_irq_chip_data(irq); 1169 ab = irq_data_get_irq_chip_data(data);
1169 plf_data = ab->i2c_client[0]->dev.platform_data; 1170 plf_data = ab->i2c_client[0]->dev.platform_data;
1170 irq -= plf_data->irq.base; 1171 irq = data->irq - plf_data->irq.base;
1171 1172
1172 spin_lock_irqsave(&ab->event_lock, flags); 1173 spin_lock_irqsave(&ab->event_lock, flags);
1173 ab->event_mask[irq / 8] |= BIT(irq % 8); 1174 ab->event_mask[irq / 8] |= BIT(irq % 8);
@@ -1176,15 +1177,16 @@ static void ab3550_mask(unsigned int irq)
1176 schedule_work(&ab->mask_work); 1177 schedule_work(&ab->mask_work);
1177} 1178}
1178 1179
1179static void ab3550_unmask(unsigned int irq) 1180static void ab3550_unmask(struct irq_data *data)
1180{ 1181{
1181 unsigned long flags; 1182 unsigned long flags;
1182 struct ab3550 *ab; 1183 struct ab3550 *ab;
1183 struct ab3550_platform_data *plf_data; 1184 struct ab3550_platform_data *plf_data;
1185 int irq;
1184 1186
1185 ab = get_irq_chip_data(irq); 1187 ab = irq_data_get_irq_chip_data(data);
1186 plf_data = ab->i2c_client[0]->dev.platform_data; 1188 plf_data = ab->i2c_client[0]->dev.platform_data;
1187 irq -= plf_data->irq.base; 1189 irq = data->irq - plf_data->irq.base;
1188 1190
1189 spin_lock_irqsave(&ab->event_lock, flags); 1191 spin_lock_irqsave(&ab->event_lock, flags);
1190 ab->event_mask[irq / 8] &= ~BIT(irq % 8); 1192 ab->event_mask[irq / 8] &= ~BIT(irq % 8);
@@ -1193,20 +1195,16 @@ static void ab3550_unmask(unsigned int irq)
1193 schedule_work(&ab->mask_work); 1195 schedule_work(&ab->mask_work);
1194} 1196}
1195 1197
1196static void noop(unsigned int irq) 1198static void noop(struct irq_data *data)
1197{ 1199{
1198} 1200}
1199 1201
1200static struct irq_chip ab3550_irq_chip = { 1202static struct irq_chip ab3550_irq_chip = {
1201 .name = "ab3550-core", /* Keep the same name as the request */ 1203 .name = "ab3550-core", /* Keep the same name as the request */
1202 .startup = NULL, /* defaults to enable */ 1204 .irq_disable = ab3550_mask, /* No default to mask in chip.c */
1203 .shutdown = NULL, /* defaults to disable */ 1205 .irq_ack = noop,
1204 .enable = NULL, /* defaults to unmask */ 1206 .irq_mask = ab3550_mask,
1205 .disable = ab3550_mask, /* No default to mask in chip.c */ 1207 .irq_unmask = ab3550_unmask,
1206 .ack = noop,
1207 .mask = ab3550_mask,
1208 .unmask = ab3550_unmask,
1209 .end = NULL,
1210}; 1208};
1211 1209
1212struct ab_family_id { 1210struct ab_family_id {