summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Nash <enash54@gmail.com>2013-07-28 09:47:05 -0400
committerEd Nash <enash54@gmail.com>2013-07-28 09:47:05 -0400
commit28dd51850b753fea8a61848d0eae1f97459e3d5b (patch)
treedbe8c4b723e762d5745aead6a90798efa21a1549
parent625af91c5ecb9254375d471a0b4589d5264c7465 (diff)
fix debugfs worng directory for gate.
cleanup debug comment / code in i2c-imx
-rw-r--r--arch/arm/mach-mvf/mvf_sema4.c15
-rw-r--r--drivers/i2c/busses/i2c-imx.c4
-rw-r--r--include/linux/mvf_sema4.h4
3 files changed, 14 insertions, 9 deletions
diff --git a/arch/arm/mach-mvf/mvf_sema4.c b/arch/arm/mach-mvf/mvf_sema4.c
index 00c3cb664d79..2176c628c166 100644
--- a/arch/arm/mach-mvf/mvf_sema4.c
+++ b/arch/arm/mach-mvf/mvf_sema4.c
@@ -116,7 +116,8 @@ int mvf_sema4_assign(int gate_num, bool use_interrupts, MVF_SEMA4** sema4_p)
int retval;
u32 cp0ine;
unsigned long irq_flags;
- char debugfs_gatedir[4];
+ char debugfs_gatedir_name[4];
+ struct dentry *debugfs_gate_dir;
// take the opportunity to initialize the whole sub-system
if(!initialized)
@@ -152,13 +153,14 @@ int mvf_sema4_assign(int gate_num, bool use_interrupts, MVF_SEMA4** sema4_p)
}
// debugfs
- sprintf(debugfs_gatedir, "%d", gate_num);
- debugfs_dir = debugfs_create_dir(debugfs_gatedir, debugfs_dir);
- debugfs_create_u32("attempts", 0444, debugfs_dir, &(*sema4_p)->attempts);
- debugfs_create_u32("interrupts", 0444, debugfs_dir, &(*sema4_p)->interrupts);
+ sprintf(debugfs_gatedir_name, "%d", gate_num);
+ debugfs_gate_dir = debugfs_create_dir(debugfs_gatedir_name, debugfs_dir);
+ debugfs_create_u32("attempts", 0444, debugfs_gate_dir, &(*sema4_p)->attempts);
+ debugfs_create_u32("interrupts", 0444, debugfs_gate_dir, &(*sema4_p)->interrupts);
return 0;
}
+EXPORT_SYMBOL(mvf_sema4_assign);
int mvf_sema4_deassign(MVF_SEMA4 *sema4)
{
@@ -184,6 +186,7 @@ int mvf_sema4_deassign(MVF_SEMA4 *sema4)
return 0;
}
+EXPORT_SYMBOL(mvf_sema4_deassign);
int mvf_sema4_lock(MVF_SEMA4 *sema4, unsigned int timeout_us)
{
@@ -230,6 +233,7 @@ int mvf_sema4_lock(MVF_SEMA4 *sema4, unsigned int timeout_us)
return 0;
}
+EXPORT_SYMBOL(mvf_sema4_lock);
int mvf_sema4_unlock(MVF_SEMA4 *sema4)
{
@@ -241,4 +245,5 @@ int mvf_sema4_unlock(MVF_SEMA4 *sema4)
return 0;
}
+EXPORT_SYMBOL(mvf_sema4_unlock);
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 60d2f40420aa..a2e6d2aa16b3 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -620,9 +620,9 @@ static int __init i2c_imx_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, i2c_imx);
#ifdef CONFIG_ARCH_MVF
- // make sure not in use by MQX
+ // for makeing sure not in use by MQX concurrently
if(mvf_sema4_assign(MVF_I2C_SEMAPHORE_NUMBER, true, &sema4)) {
- dev_err(&pdev->dev, "could not grab MQX semaphore\n");
+ dev_err(&pdev->dev, "could not assign MQX semaphore %d\n", MVF_I2C_SEMAPHORE_NUMBER);
goto fail5;
}
#endif
diff --git a/include/linux/mvf_sema4.h b/include/linux/mvf_sema4.h
index 7a93551e4905..3f6e4f5d97bb 100644
--- a/include/linux/mvf_sema4.h
+++ b/include/linux/mvf_sema4.h
@@ -14,8 +14,8 @@ typedef struct mvf_sema4_handle_struct {
int use_interrupts;
wait_queue_head_t wait_queue;
// stats
- unsigned long attempts;
- unsigned long interrupts;
+ u32 attempts;
+ u32 interrupts;
struct dentry *debugfs_file;
} MVF_SEMA4;