aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorDaniel Walker <dwalker@codeaurora.org>2010-03-17 14:10:40 -0400
committerDaniel Walker <dwalker@codeaurora.org>2010-05-12 12:19:06 -0400
commit3843ac3a5cd01824b5801209808e73fb9df7ee22 (patch)
treed05d4b9e005a6c33a3845ea337af94b9b83aedaf /arch/arm
parent74df1d07ee01b7276cba64160ea6dfe195de008f (diff)
arm: msm: smd: remove unneeded predefines
This just removed some unneeded predefines. One needed a whole function moved down further. The others could just be deleted. No functional changes. Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-msm/smd.c77
1 files changed, 36 insertions, 41 deletions
diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c
index 2a9b85ca5c07..f3558f504709 100644
--- a/arch/arm/mach-msm/smd.c
+++ b/arch/arm/mach-msm/smd.c
@@ -62,9 +62,6 @@ static struct shared_info smd_info = {
62module_param_named(debug_mask, msm_smd_debug_mask, 62module_param_named(debug_mask, msm_smd_debug_mask,
63 int, S_IRUGO | S_IWUSR | S_IWGRP); 63 int, S_IRUGO | S_IWUSR | S_IWGRP);
64 64
65void *smem_item(unsigned id, unsigned *size);
66static void smd_diag(void);
67
68static unsigned last_heap_free = 0xffffffff; 65static unsigned last_heap_free = 0xffffffff;
69 66
70static inline void notify_other_smsm(void) 67static inline void notify_other_smsm(void)
@@ -147,44 +144,6 @@ LIST_HEAD(smd_ch_list_dsp);
147static unsigned char smd_ch_allocated[64]; 144static unsigned char smd_ch_allocated[64];
148static struct work_struct probe_work; 145static struct work_struct probe_work;
149 146
150static int smd_alloc_channel(const char *name, uint32_t cid, uint32_t type);
151
152static void smd_channel_probe_worker(struct work_struct *work)
153{
154 struct smd_alloc_elm *shared;
155 unsigned ctype;
156 unsigned type;
157 unsigned n;
158
159 shared = smem_find(ID_CH_ALLOC_TBL, sizeof(*shared) * 64);
160 if (!shared) {
161 pr_err("smd: cannot find allocation table\n");
162 return;
163 }
164 for (n = 0; n < 64; n++) {
165 if (smd_ch_allocated[n])
166 continue;
167 if (!shared[n].ref_count)
168 continue;
169 if (!shared[n].name[0])
170 continue;
171 ctype = shared[n].ctype;
172 type = ctype & SMD_TYPE_MASK;
173
174 /* DAL channels are stream but neither the modem,
175 * nor the DSP correctly indicate this. Fixup manually.
176 */
177 if (!memcmp(shared[n].name, "DAL", 3))
178 ctype = (ctype & (~SMD_KIND_MASK)) | SMD_KIND_STREAM;
179
180 type = shared[n].ctype & SMD_TYPE_MASK;
181 if ((type == SMD_TYPE_APPS_MODEM) ||
182 (type == SMD_TYPE_APPS_DSP))
183 if (!smd_alloc_channel(shared[n].name, shared[n].cid, ctype))
184 smd_ch_allocated[n] = 1;
185 }
186}
187
188/* how many bytes are available for reading */ 147/* how many bytes are available for reading */
189static int smd_stream_read_avail(struct smd_channel *ch) 148static int smd_stream_read_avail(struct smd_channel *ch)
190{ 149{
@@ -651,6 +610,42 @@ static int smd_alloc_channel(const char *name, uint32_t cid, uint32_t type)
651 return 0; 610 return 0;
652} 611}
653 612
613static void smd_channel_probe_worker(struct work_struct *work)
614{
615 struct smd_alloc_elm *shared;
616 unsigned ctype;
617 unsigned type;
618 unsigned n;
619
620 shared = smem_find(ID_CH_ALLOC_TBL, sizeof(*shared) * 64);
621 if (!shared) {
622 pr_err("smd: cannot find allocation table\n");
623 return;
624 }
625 for (n = 0; n < 64; n++) {
626 if (smd_ch_allocated[n])
627 continue;
628 if (!shared[n].ref_count)
629 continue;
630 if (!shared[n].name[0])
631 continue;
632 ctype = shared[n].ctype;
633 type = ctype & SMD_TYPE_MASK;
634
635 /* DAL channels are stream but neither the modem,
636 * nor the DSP correctly indicate this. Fixup manually.
637 */
638 if (!memcmp(shared[n].name, "DAL", 3))
639 ctype = (ctype & (~SMD_KIND_MASK)) | SMD_KIND_STREAM;
640
641 type = shared[n].ctype & SMD_TYPE_MASK;
642 if ((type == SMD_TYPE_APPS_MODEM) ||
643 (type == SMD_TYPE_APPS_DSP))
644 if (!smd_alloc_channel(shared[n].name, shared[n].cid, ctype))
645 smd_ch_allocated[n] = 1;
646 }
647}
648
654static void do_nothing_notify(void *priv, unsigned flags) 649static void do_nothing_notify(void *priv, unsigned flags)
655{ 650{
656} 651}