From e2cfb33bd44ccaace91ecc3276f77dc2ab591c62 Mon Sep 17 00:00:00 2001
From: Jingdong Lu <jingdong.lu@windriver.com>
Date: Tue, 18 Oct 2011 15:19:27 +0800
Subject: [PATCH 29/60] Fix compile error

Some definations in include/linux/irq.h are deprecated. But they are
used in drivers/mfd/twl6040-irq.c
CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED

Signed-off-by: Jingdong Lu <jingdong.lu@windriver.com>
---
 drivers/mfd/twl6040-codec.c |    4 ++--
 drivers/mfd/twl6040-irq.c   |   14 +++++++-------
 include/linux/irq.h         |    8 ++++++++
 3 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/drivers/mfd/twl6040-codec.c b/drivers/mfd/twl6040-codec.c
index 1f3cd54..a726e36 100644
--- a/drivers/mfd/twl6040-codec.c
+++ b/drivers/mfd/twl6040-codec.c
@@ -616,7 +616,7 @@ static int __devinit twl6040_probe(struct platform_device *pdev)
 		cell = &twl6040->cells[children];
 		cell->name = "twl6040-codec";
 		cell->platform_data = pdata->audio;
-		cell->data_size = sizeof(*pdata->audio);
+		cell->pdata_size = sizeof(*pdata->audio);
 		children++;
 	}
 
@@ -624,7 +624,7 @@ static int __devinit twl6040_probe(struct platform_device *pdev)
 		cell = &twl6040->cells[children];
 		cell->name = "twl6040-vibra";
 		cell->platform_data = pdata->vibra;
-		cell->data_size = sizeof(*pdata->vibra);
+		cell->pdata_size = sizeof(*pdata->vibra);
 		children++;
 	}
 
diff --git a/drivers/mfd/twl6040-irq.c b/drivers/mfd/twl6040-irq.c
index c607ed6..3b34417 100644
--- a/drivers/mfd/twl6040-irq.c
+++ b/drivers/mfd/twl6040-irq.c
@@ -59,14 +59,14 @@ static inline struct twl6040_irq_data *irq_to_twl6040_irq(struct twl6040 *twl604
 
 static void twl6040_irq_lock(unsigned int irq)
 {
-	struct twl6040 *twl6040 = get_irq_chip_data(irq);
+	struct twl6040 *twl6040 = irq_get_chip_data(irq);
 
 	mutex_lock(&twl6040->irq_mutex);
 }
 
 static void twl6040_irq_sync_unlock(unsigned int irq)
 {
-	struct twl6040 *twl6040 = get_irq_chip_data(irq);
+	struct twl6040 *twl6040 = irq_get_chip_data(irq);
 
 	/* write back to hardware any change in irq mask */
 	if (twl6040->irq_masks_cur != twl6040->irq_masks_cache) {
@@ -80,7 +80,7 @@ static void twl6040_irq_sync_unlock(unsigned int irq)
 
 static void twl6040_irq_unmask(unsigned int irq)
 {
-	struct twl6040 *twl6040 = get_irq_chip_data(irq);
+	struct twl6040 *twl6040 = irq_get_chip_data(irq);
 	struct twl6040_irq_data *irq_data = irq_to_twl6040_irq(twl6040, irq);
 
 	twl6040->irq_masks_cur &= ~irq_data->mask;
@@ -88,7 +88,7 @@ static void twl6040_irq_unmask(unsigned int irq)
 
 static void twl6040_irq_mask(unsigned int irq)
 {
-	struct twl6040 *twl6040 = get_irq_chip_data(irq);
+	struct twl6040 *twl6040 = irq_get_chip_data(irq);
 	struct twl6040_irq_data *irq_data = irq_to_twl6040_irq(twl6040, irq);
 
 	twl6040->irq_masks_cur |= irq_data->mask;
@@ -153,10 +153,10 @@ int twl6040_irq_init(struct twl6040 *twl6040)
 	for (cur_irq = twl6040->irq_base;
 	     cur_irq < twl6040->irq_base + ARRAY_SIZE(twl6040_irqs);
 	     cur_irq++) {
-		set_irq_chip_data(cur_irq, twl6040);
-		set_irq_chip_and_handler(cur_irq, &twl6040_irq_chip,
+		irq_set_chip_data(cur_irq, twl6040);
+		irq_set_chip_and_handler(cur_irq, &twl6040_irq_chip,
 					 handle_level_irq);
-		set_irq_nested_thread(cur_irq, 1);
+		irq_set_nested_thread(cur_irq, 1);
 
 		/* ARM needs us to explicitly flag the IRQ as valid
 		 * and will set them noprobe when we do so. */
diff --git a/include/linux/irq.h b/include/linux/irq.h
index baa397e..b449369 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -290,6 +290,14 @@ static inline void irqd_clr_chained_irq_inprogress(struct irq_data *d)
  */
 struct irq_chip {
 	const char	*name;
+#ifndef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED
+    void        (*bus_lock)(unsigned int irq);
+    void        (*bus_sync_unlock)(unsigned int irq);
+    void        (*mask)(unsigned int irq);
+    void        (*unmask)(unsigned int irq);
+#endif
+
+
 	unsigned int	(*irq_startup)(struct irq_data *data);
 	void		(*irq_shutdown)(struct irq_data *data);
 	void		(*irq_enable)(struct irq_data *data);
-- 
1.7.4.1

