lkml.org 
[lkml]   [2010]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 25/29] memstick: jmb38x_ms: pass j38ms_host to few functions instead of memstick_host
Date
Just for consistency

Signed-off-by: Maxim Levitsky<maximlevitsky@gmail.com>
---
drivers/memstick/host/jmb38x_ms.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/memstick/host/jmb38x_ms.c b/drivers/memstick/host/jmb38x_ms.c
index 16d022e..725b485 100644
--- a/drivers/memstick/host/jmb38x_ms.c
+++ b/drivers/memstick/host/jmb38x_ms.c
@@ -510,24 +510,24 @@ out:
/* Timer that is executed in absense of the interrupt */
static void j38ms_irq_timeout(unsigned long data)
{
- struct memstick_host *msh = (struct memstick_host *)data;
- struct j38ms_host *host = memstick_priv(msh);
+ struct j38ms_host *host = (struct j38ms_host *)data;
unsigned long flags;

- dev_dbg(&host->chip->pdev->dev, "abort\n");
+ dbg(host, "interrupt timeout");
+
spin_lock_irqsave(&host->lock, flags);
if (host->req) {
host->req->error = -ETIME;
- j38ms_complete_tpc(msh);
+ j38ms_complete_tpc(host->msh);
tasklet_schedule(&host->tasklet);
}
+
spin_unlock_irqrestore(&host->lock, flags);
}

static void j38ms_submit_tasklet(unsigned long data)
{
- struct memstick_host *msh = (struct memstick_host *)data;
- struct j38ms_host *host = memstick_priv(msh);
+ struct j38ms_host *host = (struct j38ms_host *)data;
unsigned long flags;

spin_lock_irqsave(&host->lock, flags);
@@ -768,15 +768,15 @@ static struct memstick_host *j38ms_alloc_host(struct j38ms *jm, int cnt)
snprintf(host->host_id, sizeof(host->host_id), DRIVER_NAME ":slot%d",
host->id);
host->irq = jm->pdev->irq;
- host->timeout_jiffies = msecs_to_jiffies(1000);

- tasklet_init(&host->notify, j38ms_submit_tasklet, (unsigned long)msh);
msh->request = j38ms_submit_req;
msh->set_param = j38ms_set_param;

msh->caps = MEMSTICK_CAP_PAR4 | MEMSTICK_CAP_PAR8;

- setup_timer(&host->timer, j38ms_irq_timeout, (unsigned long)msh);
+ host->timeout_jiffies = msecs_to_jiffies(1000);
+ setup_timer(&host->timer, j38ms_irq_timeout, (unsigned long)host);
+ tasklet_init(&host->tasklet, j38ms_submit_tasklet, (unsigned long)host);

host->dma_bounce_page = pci_alloc_consistent(
jm->pdev, PAGE_SIZE, &host->dma_bus_address);
--
1.7.1


\
 
 \ /
  Last update: 2010-10-23 01:59    [W:0.317 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site