Commit c8e043e6f717b0256b1cfc55d03c232e8a5c8cbd
Committed by
Wolfram Sang
1 parent
259aada436
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
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>
Showing 1 changed file with 5 additions and 7 deletions Side-by-side Diff
drivers/i2c/busses/i2c-designware-baytrail.c
... | ... | @@ -17,7 +17,9 @@ |
17 | 17 | #include <linux/acpi.h> |
18 | 18 | #include <linux/i2c.h> |
19 | 19 | #include <linux/interrupt.h> |
20 | + | |
20 | 21 | #include <asm/iosf_mbi.h> |
22 | + | |
21 | 23 | #include "i2c-designware-core.h" |
22 | 24 | |
23 | 25 | #define SEMAPHORE_TIMEOUT 100 |
24 | 26 | |
... | ... | @@ -60,9 +62,9 @@ |
60 | 62 | dev_err(dev, "iosf failed to reset punit semaphore during write\n"); |
61 | 63 | } |
62 | 64 | |
63 | -int baytrail_i2c_acquire(struct dw_i2c_dev *dev) | |
65 | +static int baytrail_i2c_acquire(struct dw_i2c_dev *dev) | |
64 | 66 | { |
65 | - u32 sem = 0; | |
67 | + u32 sem; | |
66 | 68 | int ret; |
67 | 69 | unsigned long start, end; |
68 | 70 | |
69 | 71 | |
... | ... | @@ -109,9 +111,8 @@ |
109 | 111 | |
110 | 112 | return -ETIMEDOUT; |
111 | 113 | } |
112 | -EXPORT_SYMBOL(baytrail_i2c_acquire); | |
113 | 114 | |
114 | -void baytrail_i2c_release(struct dw_i2c_dev *dev) | |
115 | +static void baytrail_i2c_release(struct dw_i2c_dev *dev) | |
115 | 116 | { |
116 | 117 | if (!dev || !dev->dev) |
117 | 118 | return; |
... | ... | @@ -123,7 +124,6 @@ |
123 | 124 | dev_dbg(dev->dev, "punit semaphore held for %ums\n", |
124 | 125 | jiffies_to_msecs(jiffies - acquired)); |
125 | 126 | } |
126 | -EXPORT_SYMBOL(baytrail_i2c_release); | |
127 | 127 | |
128 | 128 | int i2c_dw_eval_lock_support(struct dw_i2c_dev *dev) |
129 | 129 | { |
... | ... | @@ -139,7 +139,6 @@ |
139 | 139 | return 0; |
140 | 140 | |
141 | 141 | status = acpi_evaluate_integer(handle, "_SEM", NULL, &shared_host); |
142 | - | |
143 | 142 | if (ACPI_FAILURE(status)) |
144 | 143 | return 0; |
145 | 144 | |
... | ... | @@ -155,7 +154,6 @@ |
155 | 154 | |
156 | 155 | return 0; |
157 | 156 | } |
158 | -EXPORT_SYMBOL(i2c_dw_eval_lock_support); | |
159 | 157 | |
160 | 158 | MODULE_AUTHOR("David E. Box <david.e.box@linux.intel.com>"); |
161 | 159 | MODULE_DESCRIPTION("Baytrail I2C Semaphore driver"); |