* [PATCH] ARM: OMAP: fix workqueue changes
@ 2006-12-22 5:39 Kyungmin Park
2006-12-22 18:24 ` David Brownell
0 siblings, 1 reply; 3+ messages in thread
From: Kyungmin Park @ 2006-12-22 5:39 UTC (permalink / raw)
To: linux-omap-open-source
[-- Attachment #1: Type: text/plain, Size: 2319 bytes --]
[PATCH] ARM: OMAP: fix workqueue changes
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
--
diff --git a/drivers/mmc/omap.c b/drivers/mmc/omap.c
index 1852268..f46aed7 100644
--- a/drivers/mmc/omap.c
+++ b/drivers/mmc/omap.c
@@ -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;
diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
index 634aca1..b8d0ec0 100644
--- a/drivers/spi/omap2_mcspi.c
+++ b/drivers/spi/omap2_mcspi.c
@@ -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);
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] ARM: OMAP: fix workqueue changes
2006-12-22 5:39 [PATCH] ARM: OMAP: fix workqueue changes Kyungmin Park
@ 2006-12-22 18:24 ` David Brownell
2006-12-22 20:21 ` Tony Lindgren
0 siblings, 1 reply; 3+ messages in thread
From: David Brownell @ 2006-12-22 18:24 UTC (permalink / raw)
To: linux-omap-open-source, kyungmin.park
On Thursday 21 December 2006 9:39 pm, Kyungmin Park wrote:
> [PATCH] ARM: OMAP: fix workqueue changes
This kind of patch needs to get submitted upstream ASAP, since
that's where the breakage is coming from ... as an MMC patch,
I think that means it should goto Pierre Ossman.
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>
> --
>
> diff --git a/drivers/mmc/omap.c b/drivers/mmc/omap.c
> index 1852268..f46aed7 100644
> --- a/drivers/mmc/omap.c
> +++ b/drivers/mmc/omap.c
> @@ -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;
> diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
> index 634aca1..b8d0ec0 100644
> --- a/drivers/spi/omap2_mcspi.c
> +++ b/drivers/spi/omap2_mcspi.c
> @@ -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);
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ARM: OMAP: fix workqueue changes
2006-12-22 18:24 ` David Brownell
@ 2006-12-22 20:21 ` Tony Lindgren
0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2006-12-22 20:21 UTC (permalink / raw)
To: David Brownell; +Cc: linux-omap-open-source
* David Brownell <david-b@pacbell.net> [061222 10:25]:
> On Thursday 21 December 2006 9:39 pm, Kyungmin Park wrote:
> > [PATCH] ARM: OMAP: fix workqueue changes
>
> This kind of patch needs to get submitted upstream ASAP, since
> that's where the breakage is coming from ... as an MMC patch,
> I think that means it should goto Pierre Ossman.
Pushing today to linux-omap. Kyungmin, please send it to Pierre also.
BTW, the patch was missing the last linefeed at the end to apply.
Regards,
Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-12-22 20:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-22 5:39 [PATCH] ARM: OMAP: fix workqueue changes Kyungmin Park
2006-12-22 18:24 ` David Brownell
2006-12-22 20:21 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox