Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192163
b: refs/heads/master
c: 34f719b
h: refs/heads/master
i:
  192161: b687bc4
  192159: 4388e65
v: v3
  • Loading branch information
Brian Swetland authored and Daniel Walker committed May 12, 2010
1 parent 493ae44 commit 9a8bada
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7632fba05197999fb0d24776b567682ebd62f62a
refs/heads/master: 34f719b0c25cca6e11164f926fc798c25499aa96
13 changes: 7 additions & 6 deletions trunk/arch/arm/mach-msm/smd.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ LIST_HEAD(smd_ch_list_dsp);
static unsigned char smd_ch_allocated[64];
static struct work_struct probe_work;

static void smd_alloc_channel(const char *name, uint32_t cid, uint32_t type);
static int smd_alloc_channel(const char *name, uint32_t cid, uint32_t type);

static void smd_channel_probe_worker(struct work_struct *work)
{
Expand Down Expand Up @@ -186,8 +186,8 @@ static void smd_channel_probe_worker(struct work_struct *work)
type = shared[n].ctype & SMD_TYPE_MASK;
if ((type == SMD_TYPE_APPS_MODEM) ||
(type == SMD_TYPE_APPS_DSP))
smd_alloc_channel(shared[n].name, shared[n].cid, ctype);
smd_ch_allocated[n] = 1;
if (!smd_alloc_channel(shared[n].name, shared[n].cid, ctype))
smd_ch_allocated[n] = 1;
}
}

Expand Down Expand Up @@ -641,20 +641,20 @@ static int smd_alloc_v1(struct smd_channel *ch)
}


static void smd_alloc_channel(const char *name, uint32_t cid, uint32_t type)
static int smd_alloc_channel(const char *name, uint32_t cid, uint32_t type)
{
struct smd_channel *ch;

ch = kzalloc(sizeof(struct smd_channel), GFP_KERNEL);
if (ch == 0) {
pr_err("smd_alloc_channel() out of memory\n");
return;
return -1;
}
ch->n = cid;

if (smd_alloc_v2(ch) && smd_alloc_v1(ch)) {
kfree(ch);
return;
return -1;
}

ch->fifo_mask = ch->fifo_size - 1;
Expand Down Expand Up @@ -696,6 +696,7 @@ static void smd_alloc_channel(const char *name, uint32_t cid, uint32_t type)
mutex_unlock(&smd_creation_mutex);

platform_device_register(&ch->pdev);
return 0;
}

static void do_nothing_notify(void *priv, unsigned flags)
Expand Down

0 comments on commit 9a8bada

Please sign in to comment.