]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: fix workqueue changes
authorKyungmin Park <kyungmin.park@samsung.com>
Fri, 22 Dec 2006 20:19:43 +0000 (12:19 -0800)
committerTony Lindgren <tony@atomide.com>
Fri, 22 Dec 2006 20:19:43 +0000 (12:19 -0800)
fix workqueue changes

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
--
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/mmc/omap.c
drivers/spi/omap2_mcspi.c

index 1852268ab4032059b9ce83123050277ce34e8b2f..f46aed795500460e12bb2904f579032cc484a8d8 100644 (file)
@@ -582,9 +582,9 @@ static void mmc_omap_switch_timer(unsigned long arg)
        schedule_work(&host->switch_work);
 }
 
-static void mmc_omap_switch_handler(void *data)
+static void mmc_omap_switch_handler(struct work_struct *work)
 {
-       struct mmc_omap_host *host = (struct mmc_omap_host *) data;
+       struct mmc_omap_host *host = container_of(work, struct mmc_omap_host, switch_work);
        struct mmc_card *card;
        static int complained = 0;
        int cards = 0, cover_open;
@@ -1122,7 +1122,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, host);
 
        if (host->switch_pin >= 0) {
-               INIT_WORK(&host->switch_work, mmc_omap_switch_handler, host);
+               INIT_WORK(&host->switch_work, mmc_omap_switch_handler);
                init_timer(&host->switch_timer);
                host->switch_timer.function = mmc_omap_switch_timer;
                host->switch_timer.data = (unsigned long) host;
index 634aca188f1461ff1f78fc2b1af2bb1c8232e6a4..b8d0ec0e16a4cd740eab880aa75ef958de36813a 100644 (file)
@@ -634,7 +634,7 @@ static int omap2_mcspi_setup(struct spi_device *spi)
        mcspi_dma = &mcspi->dma_channels[spi->chip_select];
 
        if (!cs) {
-               cs = kzalloc(sizeof *cs, SLAB_KERNEL);
+               cs = kzalloc(sizeof *cs, GFP_KERNEL);
                if (!cs)
                        return -ENOMEM;
                spi->controller_state = cs;
@@ -669,9 +669,9 @@ static void omap2_mcspi_cleanup(const struct spi_device *spi)
 }
 
 
-static void omap2_mcspi_work(void * arg)
+static void omap2_mcspi_work(struct work_struct *work)
 {
-       struct omap2_mcspi      *mcspi = (struct omap2_mcspi *) arg;
+       struct omap2_mcspi      *mcspi = container_of(work, struct omap2_mcspi, work);
        unsigned long           flags;
 
        spin_lock_irqsave(&mcspi->lock, flags);
@@ -820,7 +820,7 @@ static int __devinit omap2_mcspi_probe(struct platform_device *pdev)
        
        mcspi->base = io_p2v(r->start);
 
-       INIT_WORK(&mcspi->work, omap2_mcspi_work, mcspi);
+       INIT_WORK(&mcspi->work, omap2_mcspi_work);
 
        spin_lock_init(&mcspi->lock);
        INIT_LIST_HEAD(&mcspi->msg_queue);