aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2015-02-10 12:06:08 -0500
committerWolfram Sang <wsa@the-dreams.de>2015-03-06 19:07:46 -0500
commitc8e043e6f717b0256b1cfc55d03c232e8a5c8cbd (patch)
tree110a175e0fe68502c8935f58a8686f8675fa580f
parent259aada436e13ec75a8b0f252a78e6577879008e (diff)
i2c: designware-baytrail: fix sparse warnings
There is no need to export functions that are used as the callbacks in the struct dw_i2c_dev. Otherwise we get the following warnings: drivers/i2c/busses/i2c-designware-baytrail.c:63:5: warning: symbol 'baytrail_i2c_acquire' was not declared. Should it be static? drivers/i2c/busses/i2c-designware-baytrail.c:114:6: warning: symbol 'baytrail_i2c_release' was not declared. Should it be static? While here, do few indentation fixes, remove i2c_dw_eval_lock_support() from functions exported to the modules and redundant assignment of local sem variable. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: David E. Box <david.e.box@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-rw-r--r--drivers/i2c/busses/i2c-designware-baytrail.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/i2c/busses/i2c-designware-baytrail.c b/drivers/i2c/busses/i2c-designware-baytrail.c
index 9b6765554c70..d33474422003 100644
--- a/drivers/i2c/busses/i2c-designware-baytrail.c
+++ b/drivers/i2c/busses/i2c-designware-baytrail.c
@@ -17,7 +17,9 @@
17#include <linux/acpi.h> 17#include <linux/acpi.h>
18#include <linux/i2c.h> 18#include <linux/i2c.h>
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20
20#include <asm/iosf_mbi.h> 21#include <asm/iosf_mbi.h>
22
21#include "i2c-designware-core.h" 23#include "i2c-designware-core.h"
22 24
23#define SEMAPHORE_TIMEOUT 100 25#define SEMAPHORE_TIMEOUT 100
@@ -60,9 +62,9 @@ static void reset_semaphore(struct device *dev)
60 dev_err(dev, "iosf failed to reset punit semaphore during write\n"); 62 dev_err(dev, "iosf failed to reset punit semaphore during write\n");
61} 63}
62 64
63int baytrail_i2c_acquire(struct dw_i2c_dev *dev) 65static int baytrail_i2c_acquire(struct dw_i2c_dev *dev)
64{ 66{
65 u32 sem = 0; 67 u32 sem;
66 int ret; 68 int ret;
67 unsigned long start, end; 69 unsigned long start, end;
68 70
@@ -109,9 +111,8 @@ int baytrail_i2c_acquire(struct dw_i2c_dev *dev)
109 111
110 return -ETIMEDOUT; 112 return -ETIMEDOUT;
111} 113}
112EXPORT_SYMBOL(baytrail_i2c_acquire);
113 114
114void baytrail_i2c_release(struct dw_i2c_dev *dev) 115static void baytrail_i2c_release(struct dw_i2c_dev *dev)
115{ 116{
116 if (!dev || !dev->dev) 117 if (!dev || !dev->dev)
117 return; 118 return;
@@ -123,7 +124,6 @@ void baytrail_i2c_release(struct dw_i2c_dev *dev)
123 dev_dbg(dev->dev, "punit semaphore held for %ums\n", 124 dev_dbg(dev->dev, "punit semaphore held for %ums\n",
124 jiffies_to_msecs(jiffies - acquired)); 125 jiffies_to_msecs(jiffies - acquired));
125} 126}
126EXPORT_SYMBOL(baytrail_i2c_release);
127 127
128int i2c_dw_eval_lock_support(struct dw_i2c_dev *dev) 128int i2c_dw_eval_lock_support(struct dw_i2c_dev *dev)
129{ 129{
@@ -139,7 +139,6 @@ int i2c_dw_eval_lock_support(struct dw_i2c_dev *dev)
139 return 0; 139 return 0;
140 140
141 status = acpi_evaluate_integer(handle, "_SEM", NULL, &shared_host); 141 status = acpi_evaluate_integer(handle, "_SEM", NULL, &shared_host);
142
143 if (ACPI_FAILURE(status)) 142 if (ACPI_FAILURE(status))
144 return 0; 143 return 0;
145 144
@@ -155,7 +154,6 @@ int i2c_dw_eval_lock_support(struct dw_i2c_dev *dev)
155 154
156 return 0; 155 return 0;
157} 156}
158EXPORT_SYMBOL(i2c_dw_eval_lock_support);
159 157
160MODULE_AUTHOR("David E. Box <david.e.box@linux.intel.com>"); 158MODULE_AUTHOR("David E. Box <david.e.box@linux.intel.com>");
161MODULE_DESCRIPTION("Baytrail I2C Semaphore driver"); 159MODULE_DESCRIPTION("Baytrail I2C Semaphore driver");