Skip to contentSkip to conversation

lcd_mipid: workqueue fixes

PATCH In review Arnaud Patard (Rtp) 2 participants 2 messages Jan 8, 2007 – Jan 9, 2007 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lcd_mipid: workqueue fixes

This patch fixes the build of the lcd_mipid in current omap -git.

---

---
drivers/video/omap/lcd_mipid.c | 10 5 + 5 - 0 !

 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/video/omap/lcd_mipid.c +5 -5
Index: linux-omap-2.6/drivers/video/omap/lcd_mipid.c
===================================================================
@@ -67,7 +67,7 @@ struct mipid_device {
 	struct lcd_panel	panel;
 
 	struct workqueue_struct	*esd_wq;
-	struct work_struct	esd_work;
+	struct delayed_work	esd_work;
 	void			(*esd_check)(struct mipid_device *m);
 };
 
@@ -390,9 +390,9 @@ static void mipid_esd_stop_check(struct 
 		cancel_rearming_delayed_workqueue(md->esd_wq, &md->esd_work);
 }
 
-static void mipid_esd_work(void *data)
+static void mipid_esd_work(struct work_struct *work)
 {
-	struct mipid_device *md = data;
+	struct mipid_device *md = container_of(work, struct mipid_device, esd_work.work);
 
 	mutex_lock(&md->mutex);
 	md->esd_check(md);
@@ -468,7 +468,7 @@ static int mipid_init(struct lcd_panel *
 		dev_err(&md->spi->dev, "can't create ESD workqueue\n");
 		return -ENOMEM;
 	}
-	INIT_WORK(&md->esd_work, mipid_esd_work, md);
+	INIT_DELAYED_WORK(&md->esd_work, mipid_esd_work);
 	mutex_init(&md->mutex);
 
 	md->enabled = panel_enabled(md);
@@ -558,7 +558,7 @@ static int mipid_spi_probe(struct spi_de
 	struct mipid_device *md;
 	int r;
 
-	md = kzalloc(sizeof(*md), SLAB_KERNEL);
+	md = kzalloc(sizeof(*md), GFP_KERNEL);
 	if (md == NULL) {
 		dev_err(&md->spi->dev, "out of memory\n");
 		return -ENOMEM;
#1 lore raw
Quoted 45 lines · Arnaud Patard

This patch fixes the build of the lcd_mipid in current omap -git.

---

---
drivers/video/omap/lcd_mipid.c | 10 5 + 5 - 0 !

 1 file changed, 5 insertions(+), 5 deletions(-)

Index: linux-omap-2.6/drivers/video/omap/lcd_mipid.c
===================================================================

drivers/video/omap/lcd_mipid.c +4 -4
@@ -67,7 +67,7 @@ struct mipid_device {
 	struct lcd_panel	panel;
 
 	struct workqueue_struct	*esd_wq;
-	struct work_struct	esd_work;
+	struct delayed_work	esd_work;
 	void			(*esd_check)(struct mipid_device *m);
 };
 
@@ -390,9 +390,9 @@ static void mipid_esd_stop_check(struct 
 		cancel_rearming_delayed_workqueue(md->esd_wq, &md->esd_work);
 }
 
-static void mipid_esd_work(void *data)
+static void mipid_esd_work(struct work_struct *work)
 {
-	struct mipid_device *md = data;
+	struct mipid_device *md = container_of(work, struct mipid_device, esd_work.work);
 
 	mutex_lock(&md->mutex);
 	md->esd_check(md);
@@ -468,7 +468,7 @@ static int mipid_init(struct lcd_panel *
 		dev_err(&md->spi->dev, "can't create ESD workqueue\n");
 		return -ENOMEM;
 	}
-	INIT_WORK(&md->esd_work, mipid_esd_work, md);
+	INIT_DELAYED_WORK(&md->esd_work, mipid_esd_work);
 	mutex_init(&md->mutex);
 
 	md->enabled = panel_enabled(md);

drivers/video/omap/lcd_mipid.c static int mipid_spi_probe(struct spi_de · line 564

Quoted 8 lines
drivers/video/omap/lcd_mipid.c +1 -1
@@ -558,7 +558,7 @@ static int mipid_spi_probe(struct spi_de
 	struct mipid_device *md;
 	int r;
 
-	md = kzalloc(sizeof(*md), SLAB_KERNEL);
+	md = kzalloc(sizeof(*md), GFP_KERNEL);
 	if (md == NULL) {
 		dev_err(&md->spi->dev, "out of memory\n");
 		return -ENOMEM;

Pushing today.

Tony