aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/ti-st/st_kim.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/ti-st/st_kim.c')
-rw-r--r--drivers/misc/ti-st/st_kim.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c
index 6d23a7222627..73b6c8b0e869 100644
--- a/drivers/misc/ti-st/st_kim.c
+++ b/drivers/misc/ti-st/st_kim.c
@@ -75,7 +75,7 @@ const unsigned char *protocol_names[] = {
75}; 75};
76 76
77#define MAX_ST_DEVICES 3 /* Imagine 1 on each UART for now */ 77#define MAX_ST_DEVICES 3 /* Imagine 1 on each UART for now */
78struct platform_device *st_kim_devices[MAX_ST_DEVICES]; 78static struct platform_device *st_kim_devices[MAX_ST_DEVICES];
79 79
80/**********************************************************************/ 80/**********************************************************************/
81/* internal functions */ 81/* internal functions */
@@ -157,17 +157,18 @@ static inline int kim_check_data_len(struct kim_data_s *kim_gdata, int len)
157void kim_int_recv(struct kim_data_s *kim_gdata, 157void kim_int_recv(struct kim_data_s *kim_gdata,
158 const unsigned char *data, long count) 158 const unsigned char *data, long count)
159{ 159{
160 register char *ptr; 160 const unsigned char *ptr;
161 struct hci_event_hdr *eh; 161 struct hci_event_hdr *eh;
162 register int len = 0, type = 0; 162 int len = 0, type = 0;
163 163
164 pr_debug("%s", __func__); 164 pr_debug("%s", __func__);
165 /* Decode received bytes here */ 165 /* Decode received bytes here */
166 ptr = (char *)data; 166 ptr = data;
167 if (unlikely(ptr == NULL)) { 167 if (unlikely(ptr == NULL)) {
168 pr_err(" received null from TTY "); 168 pr_err(" received null from TTY ");
169 return; 169 return;
170 } 170 }
171
171 while (count) { 172 while (count) {
172 if (kim_gdata->rx_count) { 173 if (kim_gdata->rx_count) {
173 len = min_t(unsigned int, kim_gdata->rx_count, count); 174 len = min_t(unsigned int, kim_gdata->rx_count, count);
@@ -231,7 +232,7 @@ void kim_int_recv(struct kim_data_s *kim_gdata,
231static long read_local_version(struct kim_data_s *kim_gdata, char *bts_scr_name) 232static long read_local_version(struct kim_data_s *kim_gdata, char *bts_scr_name)
232{ 233{
233 unsigned short version = 0, chip = 0, min_ver = 0, maj_ver = 0; 234 unsigned short version = 0, chip = 0, min_ver = 0, maj_ver = 0;
234 char read_ver_cmd[] = { 0x01, 0x01, 0x10, 0x00 }; 235 const char read_ver_cmd[] = { 0x01, 0x01, 0x10, 0x00 };
235 236
236 pr_debug("%s", __func__); 237 pr_debug("%s", __func__);
237 238
@@ -278,8 +279,8 @@ static long download_firmware(struct kim_data_s *kim_gdata)
278{ 279{
279 long err = 0; 280 long err = 0;
280 long len = 0; 281 long len = 0;
281 register unsigned char *ptr = NULL; 282 unsigned char *ptr = NULL;
282 register unsigned char *action_ptr = NULL; 283 unsigned char *action_ptr = NULL;
283 unsigned char bts_scr_name[30] = { 0 }; /* 30 char long bts scr name? */ 284 unsigned char bts_scr_name[30] = { 0 }; /* 30 char long bts scr name? */
284 285
285 err = read_local_version(kim_gdata, bts_scr_name); 286 err = read_local_version(kim_gdata, bts_scr_name);