[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1287791637-10329-19-git-send-email-maximlevitsky@gmail.com>
Date: Sat, 23 Oct 2010 01:53:46 +0200
From: Maxim Levitsky <maximlevitsky@...il.com>
To: Alex Dubov <oakad@...oo.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
Maxim Levitsky <maximlevitsky@...il.com>
Subject: [PATCH 18/29] memstick: jmb38x_ms: rename functions
Give functions names that I hope will describe them better.
Its a matter of personal taste somewhat, I admit.
Signed-off-by: Maxim Levitsky <maximlevitsky@...il.com>
---
drivers/memstick/host/jmb38x_ms.c | 38 ++++++++++++++++++------------------
drivers/memstick/host/jmb38x_ms.h | 4 +-
2 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/drivers/memstick/host/jmb38x_ms.c b/drivers/memstick/host/jmb38x_ms.c
index 2e10104..295f755 100644
--- a/drivers/memstick/host/jmb38x_ms.c
+++ b/drivers/memstick/host/jmb38x_ms.c
@@ -22,7 +22,7 @@
static int no_dma;
static int debug;
-static unsigned int j38ms_read_data(struct j38ms_host *host,
+static unsigned int j38ms_read_fifo_pio(struct j38ms_host *host,
unsigned char *buf, unsigned int length)
{
unsigned int off = 0;
@@ -60,7 +60,7 @@ static unsigned int j38ms_read_data(struct j38ms_host *host,
return off;
}
-static unsigned int j38ms_write_data(struct j38ms_host *host,
+static unsigned int j38ms_write_fifo_pio(struct j38ms_host *host,
unsigned char *buf,
unsigned int length)
{
@@ -149,12 +149,12 @@ static int j38ms_transfer_data(struct j38ms_host *host)
if (host->req->data_dir == WRITE)
t_size = !(host->cmd_flags & REG_DATA)
- ? j38ms_write_data(host, buf, p_cnt)
- : j38ms_write_reg_data(host, buf, p_cnt);
+ ? j38ms_write_fifo_pio(host, buf, p_cnt)
+ : j38ms_write_tpc_inline(host, buf, p_cnt);
else
t_size = !(host->cmd_flags & REG_DATA)
- ? j38ms_read_data(host, buf, p_cnt)
- : j38ms_read_reg_data(host, buf, p_cnt);
+ ? j38ms_read_fifo_pio(host, buf, p_cnt)
+ : j38ms_read_tpc_inline(host, buf, p_cnt);
if (host->req->long_data) {
kunmap_atomic(buf - p_off, KM_BIO_SRC_IRQ);
@@ -180,7 +180,7 @@ static int j38ms_transfer_data(struct j38ms_host *host)
return length;
}
-static unsigned int j38ms_read_reg_data(struct j38ms_host *host,
+static unsigned int j38ms_read_tpc_inline(struct j38ms_host *host,
unsigned char *buf,
unsigned int length)
{
@@ -206,7 +206,7 @@ static unsigned int j38ms_read_reg_data(struct j38ms_host *host,
return off;
}
-static unsigned int j38ms_write_reg_data(struct j38ms_host *host,
+static unsigned int j38ms_write_tpc_inline(struct j38ms_host *host,
unsigned char *buf,
unsigned int length)
{
@@ -232,7 +232,7 @@ static unsigned int j38ms_write_reg_data(struct j38ms_host *host,
return off;
}
-static int j38ms_issue_cmd(struct memstick_host *msh)
+static int j38ms_execute_tpc(struct memstick_host *msh)
{
struct j38ms_host *host = memstick_priv(msh);
unsigned char *data;
@@ -330,7 +330,7 @@ static int j38ms_issue_cmd(struct memstick_host *msh)
return 0;
}
-static void j38ms_complete_cmd(struct memstick_host *msh, int last)
+static void j38ms_complete_tpc(struct memstick_host *msh, int last)
{
struct j38ms_host *host = memstick_priv(msh);
unsigned int t_val = 0;
@@ -370,7 +370,7 @@ static void j38ms_complete_cmd(struct memstick_host *msh, int last)
if (!last) {
do {
rc = memstick_next_req(msh, &host->req);
- } while (!rc && j38ms_issue_cmd(msh));
+ } while (!rc && j38ms_execute_tpc(msh));
} else {
do {
rc = memstick_next_req(msh, &host->req);
@@ -446,13 +446,13 @@ static irqreturn_t j38ms_isr(int irq, void *dev_id)
&& (((host->cmd_flags & CMD_READY)
&& (host->cmd_flags & FIFO_READY))
|| host->req->error))
- j38ms_complete_cmd(msh, 0);
+ j38ms_complete_tpc(msh, 0);
spin_unlock(&host->lock);
return IRQ_HANDLED;
}
-static void j38ms_abort(unsigned long data)
+static void j38ms_irq_timeout(unsigned long data)
{
struct memstick_host *msh = (struct memstick_host *)data;
struct j38ms_host *host = memstick_priv(msh);
@@ -462,12 +462,12 @@ static void j38ms_abort(unsigned long data)
spin_lock_irqsave(&host->lock, flags);
if (host->req) {
host->req->error = -ETIME;
- j38ms_complete_cmd(msh, 0);
+ j38ms_complete_tpc(msh, 0);
}
spin_unlock_irqrestore(&host->lock, flags);
}
-static void j38ms_req_tasklet(unsigned long data)
+static void j38ms_submit_tasklet(unsigned long data)
{
struct memstick_host *msh = (struct memstick_host *)data;
struct j38ms_host *host = memstick_priv(msh);
@@ -479,7 +479,7 @@ static void j38ms_req_tasklet(unsigned long data)
do {
rc = memstick_next_req(msh, &host->req);
dev_dbg(&host->chip->pdev->dev, "tasklet req %d\n", rc);
- } while (!rc && j38ms_issue_cmd(msh));
+ } while (!rc && j38ms_execute_tpc(msh));
}
spin_unlock_irqrestore(&host->lock, flags);
}
@@ -713,13 +713,13 @@ static struct memstick_host *j38ms_alloc_host(struct j38ms *jm, int cnt)
host->irq = jm->pdev->irq;
host->timeout_jiffies = msecs_to_jiffies(1000);
- tasklet_init(&host->notify, j38ms_req_tasklet, (unsigned long)msh);
+ 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_abort, (unsigned long)msh);
+ setup_timer(&host->timer, j38ms_irq_timeout, (unsigned long)msh);
if (!request_irq(host->irq, j38ms_isr, IRQF_SHARED, host->host_id,
msh))
@@ -835,7 +835,7 @@ static void j38ms_remove(struct pci_dev *dev)
spin_lock_irqsave(&host->lock, flags);
if (host->req) {
host->req->error = -ETIME;
- j38ms_complete_cmd(jm->hosts[cnt], 1);
+ j38ms_complete_tpc(jm->hosts[cnt], 1);
}
spin_unlock_irqrestore(&host->lock, flags);
diff --git a/drivers/memstick/host/jmb38x_ms.h b/drivers/memstick/host/jmb38x_ms.h
index a940b5d..44e1fc1 100644
--- a/drivers/memstick/host/jmb38x_ms.h
+++ b/drivers/memstick/host/jmb38x_ms.h
@@ -187,10 +187,10 @@ enum {
#define dbg_v(host, format, ...) __dbg(host, 2, format, ## __VA_ARGS__)
#define dbg_reg(host, format, ...) __dbg(host, 3, format, ## __VA_ARGS__)
-static unsigned int j38ms_read_reg_data(struct j38ms_host *host,
+static unsigned int j38ms_read_tpc_inline(struct j38ms_host *host,
unsigned char *buf,
unsigned int length);
-static unsigned int j38ms_write_reg_data(struct j38ms_host *host,
+static unsigned int j38ms_write_tpc_inline(struct j38ms_host *host,
unsigned char *buf,
unsigned int length);
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists