[PATCH 09/49] drivers/staging/dream/qdsp5: Convert printks to pr_<level>

Joe Perches joe at perches.com
Thu Oct 15 01:54:39 UTC 2009


Signed-off-by: Joe Perches <joe at perches.com>
---
 drivers/staging/dream/qdsp5/adsp.c                 |  106 ++++++++++----------
 drivers/staging/dream/qdsp5/adsp_driver.c          |   59 +++++------
 drivers/staging/dream/qdsp5/adsp_jpeg_verify_cmd.c |   25 +++--
 drivers/staging/dream/qdsp5/adsp_lpm_verify_cmd.c  |   14 ++-
 drivers/staging/dream/qdsp5/adsp_vfe_verify_cmd.c  |   23 +++--
 .../staging/dream/qdsp5/adsp_video_verify_cmd.c    |   12 ++-
 .../staging/dream/qdsp5/adsp_videoenc_verify_cmd.c |    9 +-
 drivers/staging/dream/qdsp5/audio_aac.c            |   97 +++++++++---------
 drivers/staging/dream/qdsp5/audio_in.c             |    3 +-
 drivers/staging/dream/qdsp5/audio_out.c            |    4 +-
 drivers/staging/dream/qdsp5/audmgr.c               |   48 +++++----
 drivers/staging/dream/qdsp5/audpp.c                |   22 ++--
 12 files changed, 218 insertions(+), 204 deletions(-)

diff --git a/drivers/staging/dream/qdsp5/adsp.c b/drivers/staging/dream/qdsp5/adsp.c
index d096456..f0d53e3 100644
--- a/drivers/staging/dream/qdsp5/adsp.c
+++ b/drivers/staging/dream/qdsp5/adsp.c
@@ -24,6 +24,8 @@
  * - disallow access to non-associated queues
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
@@ -121,27 +123,27 @@ static int rpc_adsp_rtos_app_to_modem(uint32_t cmd, uint32_t module,
 	rpc_req.module = cpu_to_be32(module);
 	rc = msm_rpc_write(adsp_module->rpc_client, &rpc_req, sizeof(rpc_req));
 	if (rc < 0) {
-		pr_err("adsp: could not send RPC request: %d\n", rc);
+		pr_err("could not send RPC request: %d\n", rc);
 		return rc;
 	}
 
 	rc = msm_rpc_read(adsp_module->rpc_client,
 			  (void **)&rpc_rsp, -1, (5*HZ));
 	if (rc < 0) {
-		pr_err("adsp: error receiving RPC reply: %d (%d)\n",
+		pr_err("error receiving RPC reply: %d (%d)\n",
 		       rc, -ERESTARTSYS);
 		return rc;
 	}
 
 	if (be32_to_cpu(rpc_rsp->reply_stat) != RPCMSG_REPLYSTAT_ACCEPTED) {
-		pr_err("adsp: RPC call was denied!\n");
+		pr_err("RPC call was denied!\n");
 		kfree(rpc_rsp);
 		return -EPERM;
 	}
 
 	if (be32_to_cpu(rpc_rsp->data.acc_hdr.accept_stat) !=
 	    RPC_ACCEPTSTAT_SUCCESS) {
-		pr_err("adsp error: RPC call was not successful (%d)\n",
+		pr_err("error: RPC call was not successful (%d)\n",
 		       be32_to_cpu(rpc_rsp->data.acc_hdr.accept_stat));
 		kfree(rpc_rsp);
 		return -EINVAL;
@@ -199,7 +201,7 @@ static int adsp_rpc_init(struct msm_adsp_module *adsp_module)
 	if (IS_ERR(adsp_module->rpc_client)) {
 		int rc = PTR_ERR(adsp_module->rpc_client);
 		adsp_module->rpc_client = 0;
-		pr_err("adsp: could not open rpc client: %d\n", rc);
+		pr_err("could not open rpc client: %d\n", rc);
 		return rc;
 	}
 
@@ -223,7 +225,7 @@ static void  msm_get_init_info(void)
 	if (IS_ERR(adsp_info.init_info_rpc_client)) {
 		rc = PTR_ERR(adsp_info.init_info_rpc_client);
 		adsp_info.init_info_rpc_client = 0;
-		pr_err("adsp: could not open rpc client: %d\n", rc);
+		pr_err("could not open rpc client: %d\n", rc);
 		return;
 	}
 
@@ -240,7 +242,7 @@ static void  msm_get_init_info(void)
 	rc = msm_rpc_write(adsp_info.init_info_rpc_client,
 				&rpc_req, sizeof(rpc_req));
 	if (rc < 0)
-		pr_err("adsp: could not send RPC request: %d\n", rc);
+		pr_err("could not send RPC request: %d\n", rc);
 }
 #endif
 
@@ -259,7 +261,7 @@ int msm_adsp_get(const char *name, struct msm_adsp_module **out,
 			adsp_info.init_info_state == ADSP_STATE_INIT_INFO,
 			5 * HZ);
 		if (!rc) {
-			pr_info("adsp: INIT_INFO failed\n");
+			pr_info("INIT_INFO failed\n");
 			return -ETIMEDOUT;
 		}
 		init_info_cmd_sent++;
@@ -271,7 +273,7 @@ int msm_adsp_get(const char *name, struct msm_adsp_module **out,
 		return -ENODEV;
 
 	mutex_lock(&module->lock);
-	pr_info("adsp: opening module %s\n", module->name);
+	pr_info("opening module %s\n", module->name);
 	if (module->open_count++ == 0 && module->clk)
 		clk_enable(module->clk);
 
@@ -300,11 +302,11 @@ int msm_adsp_get(const char *name, struct msm_adsp_module **out,
 		module->ops = NULL;
 		module->driver_data = NULL;
 		*out = NULL;
-		pr_err("adsp: REGISTER_APP failed\n");
+		pr_err("REGISTER_APP failed\n");
 		goto done;
 	}
 
-	pr_info("adsp: module %s has been registered\n", module->name);
+	pr_info("module %s has been registered\n", module->name);
 
 done:
 	mutex_lock(&adsp_open_lock);
@@ -330,7 +332,7 @@ void msm_adsp_put(struct msm_adsp_module *module)
 	if (--module->open_count == 0 && module->clk)
 		clk_disable(module->clk);
 	if (module->ops) {
-		pr_info("adsp: closing module %s\n", module->name);
+		pr_info("closing module %s\n", module->name);
 
 		/* lock to ensure a dsp event cannot be delivered
 		 * during or after removal of the ops and driver_data
@@ -341,7 +343,7 @@ void msm_adsp_put(struct msm_adsp_module *module)
 		spin_unlock_irqrestore(&adsp_cmd_lock, flags);
 
 		if (module->state != ADSP_STATE_DISABLED) {
-			pr_info("adsp: disabling module %s\n", module->name);
+			pr_info("disabling module %s\n", module->name);
 			msm_adsp_disable_locked(module);
 		}
 
@@ -350,10 +352,10 @@ void msm_adsp_put(struct msm_adsp_module *module)
 		if (--adsp_open_count == 0) {
 			disable_irq(INT_ADSP);
 			allow_suspend();
-			pr_info("adsp: disable interrupt\n");
+			pr_info("disable interrupt\n");
 		}
 	} else {
-		pr_info("adsp: module %s is already closed\n", module->name);
+		pr_info("module %s is already closed\n", module->name);
 	}
 	mutex_unlock(&module->lock);
 }
@@ -377,7 +379,7 @@ static int rpc_send_accepted_void_reply(struct msm_rpc_endpoint *client,
 
 	rc = msm_rpc_write(rpc_cb_server_client, reply_buf, sizeof(reply_buf));
 	if (rc < 0)
-		pr_err("adsp: could not write RPC response: %d\n", rc);
+		pr_err("could not write RPC response: %d\n", rc);
 	return rc;
 }
 
@@ -397,13 +399,13 @@ int __msm_adsp_write(struct msm_adsp_module *module, unsigned dsp_queue_addr,
 
 	if (module->state != ADSP_STATE_ENABLED) {
 		spin_unlock_irqrestore(&adsp_cmd_lock, flags);
-		pr_err("adsp: module %s not enabled before write\n",
+		pr_err("module %s not enabled before write\n",
 		       module->name);
 		return -ENODEV;
 	}
 	if (adsp_validate_module(module->id)) {
 		spin_unlock_irqrestore(&adsp_cmd_lock, flags);
-		pr_info("adsp: module id validation failed %s  %d\n",
+		pr_info("module id validation failed %s  %d\n",
 			module->name, module->id);
 		return -ENXIO;
 	}
@@ -419,11 +421,11 @@ int __msm_adsp_write(struct msm_adsp_module *module, unsigned dsp_queue_addr,
 		ADSP_RTOS_WRITE_CTRL_WORD_READY_M) !=
 		ADSP_RTOS_WRITE_CTRL_WORD_READY_V) {
 		if (cnt > 100) {
-			pr_err("adsp: timeout waiting for DSP write ready\n");
+			pr_err("timeout waiting for DSP write ready\n");
 			ret_status = -EIO;
 			goto fail;
 		}
-		pr_warning("adsp: waiting for DSP write ready\n");
+		pr_warning("waiting for DSP write ready\n");
 		udelay(1);
 		cnt++;
 	}
@@ -456,7 +458,7 @@ int __msm_adsp_write(struct msm_adsp_module *module, unsigned dsp_queue_addr,
 		ADSP_RTOS_WRITE_CTRL_WORD_MUTEX_M) ==
 		ADSP_RTOS_WRITE_CTRL_WORD_MUTEX_NAVAIL_V) {
 		if (cnt > 5000) {
-			pr_err("adsp: timeout waiting for adsp ack\n");
+			pr_err("timeout waiting for adsp ack\n");
 			ret_status = -EIO;
 			goto fail;
 		}
@@ -543,7 +545,7 @@ int msm_adsp_write(struct msm_adsp_module *module, unsigned dsp_queue_addr,
 			udelay(10);
 	} while(rc == -EAGAIN && retries++ < 100);
 	if (retries > 50)
-		pr_warning("adsp: %s command took %d attempts: rc %d\n",
+		pr_warning("%s command took %d attempts: rc %d\n",
 				module->name, retries, rc);
 	return rc;
 }
@@ -607,7 +609,7 @@ static void handle_adsp_rtos_mtoa_app(struct rpc_request_hdr *req)
 		struct adsp_rtos_mp_mtoa_init_info_type *sptr;
 		int32_t i_no, e_idx;
 
-		pr_info("adsp:INIT_INFO Event\n");
+		pr_info("INIT_INFO Event\n");
 		sptr = &args->mtoa_pkt.adsp_rtos_mp_mtoa_data.
 				mp_mtoa_init_packet;
 
@@ -658,12 +660,12 @@ static void handle_adsp_rtos_mtoa_app(struct rpc_request_hdr *req)
 	image = be32_to_cpu(args->image);
 #endif
 
-	pr_info("adsp: rpc event=%d, proc_id=%d, module=%d, image=%d\n",
+	pr_info("rpc event=%d, proc_id=%d, module=%d, image=%d\n",
 		event, proc_id, module_id, image);
 
 	module = find_adsp_module_by_id(&adsp_info, module_id);
 	if (!module) {
-		pr_err("adsp: module %d is not supported!\n", module_id);
+		pr_err("module %d is not supported!\n", module_id);
 		rpc_send_accepted_void_reply(rpc_cb_server_client, req->xid,
 				RPC_ACCEPTSTAT_GARBAGE_ARGS);
 		return;
@@ -672,34 +674,34 @@ static void handle_adsp_rtos_mtoa_app(struct rpc_request_hdr *req)
 	mutex_lock(&module->lock);
 	switch (event) {
 	case RPC_ADSP_RTOS_MOD_READY:
-		pr_info("adsp: module %s: READY\n", module->name);
+		pr_info("module %s: READY\n", module->name);
 		module->state = ADSP_STATE_ENABLED;
 		wake_up(&module->state_wait);
 		adsp_set_image(module->info, image);
 		break;
 	case RPC_ADSP_RTOS_MOD_DISABLE:
-		pr_info("adsp: module %s: DISABLED\n", module->name);
+		pr_info("module %s: DISABLED\n", module->name);
 		module->state = ADSP_STATE_DISABLED;
 		wake_up(&module->state_wait);
 		break;
 	case RPC_ADSP_RTOS_SERVICE_RESET:
-		pr_info("adsp: module %s: SERVICE_RESET\n", module->name);
+		pr_info("module %s: SERVICE_RESET\n", module->name);
 		module->state = ADSP_STATE_DISABLED;
 		wake_up(&module->state_wait);
 		break;
 	case RPC_ADSP_RTOS_CMD_SUCCESS:
-		pr_info("adsp: module %s: CMD_SUCCESS\n", module->name);
+		pr_info("module %s: CMD_SUCCESS\n", module->name);
 		break;
 	case RPC_ADSP_RTOS_CMD_FAIL:
-		pr_info("adsp: module %s: CMD_FAIL\n", module->name);
+		pr_info("module %s: CMD_FAIL\n", module->name);
 		break;
 #if CONFIG_MSM_AMSS_VERSION >= 6350
 	case RPC_ADSP_RTOS_DISABLE_FAIL:
-		pr_info("adsp: module %s: DISABLE_FAIL\n", module->name);
+		pr_info("module %s: DISABLE_FAIL\n", module->name);
 		break;
 #endif
 	default:
-		pr_info("adsp: unknown event %d\n", event);
+		pr_info("unknown event %d\n", event);
 		rpc_send_accepted_void_reply(rpc_cb_server_client, req->xid,
 					     RPC_ACCEPTSTAT_GARBAGE_ARGS);
 		mutex_unlock(&module->lock);
@@ -727,7 +729,7 @@ static int handle_adsp_rtos_mtoa(struct rpc_request_hdr *req)
 		handle_adsp_rtos_mtoa_app(req);
 		break;
 	default:
-		pr_err("adsp: unknowned proc %d\n", req->procedure);
+		pr_err("unknowned proc %d\n", req->procedure);
 		rpc_send_accepted_void_reply(
 			rpc_cb_server_client, req->xid,
 			RPC_ACCEPTSTAT_PROC_UNAVAIL);
@@ -746,7 +748,7 @@ static int adsp_rpc_thread(void *data)
 	do {
 		rc = msm_rpc_read(rpc_cb_server_client, &buffer, -1, -1);
 		if (rc < 0) {
-			pr_err("adsp: could not read rpc: %d\n", rc);
+			pr_err("could not read rpc: %d\n", rc);
 			break;
 		}
 		req = (struct rpc_request_hdr *)buffer;
@@ -772,7 +774,7 @@ static int adsp_rpc_thread(void *data)
 		continue;
 
 bad_rpc:
-		pr_err("adsp: bogus rpc from modem\n");
+		pr_err("bogus rpc from modem\n");
 		kfree(buffer);
 	} while (1);
 
@@ -834,21 +836,21 @@ static int adsp_rtos_read_ctrl_word_cmd_tast_to_h_v(
 	}
 
 	if (rtos_task_id > info->max_task_id) {
-		pr_err("adsp: bogus task id %d\n", rtos_task_id);
+		pr_err("bogus task id %d\n", rtos_task_id);
 		return 0;
 	}
 	module = find_adsp_module_by_id(info,
 					adsp_get_module(info, rtos_task_id));
 
 	if (!module) {
-		pr_err("adsp: no module for task id %d\n", rtos_task_id);
+		pr_err("no module for task id %d\n", rtos_task_id);
 		return 0;
 	}
 
 	module->num_events++;
 
 	if (!module->ops) {
-		pr_err("adsp: module %s is not open\n", module->name);
+		pr_err("module %s is not open\n", module->name);
 		return 0;
 	}
 
@@ -890,7 +892,7 @@ static int adsp_get_event(struct adsp_info *info)
 
 		udelay(10);
 	}
-	pr_warning("adsp: not ready after 100uS\n");
+	pr_warning("not ready after 100uS\n");
 	rc = -EBUSY;
 	goto done;
 
@@ -918,7 +920,7 @@ ready:
 
 	/* We can only handle Task-to-Host messages */
 	if (cmd_type != ADSP_RTOS_READ_CTRL_WORD_CMD_TASK_TO_H_V) {
-		pr_err("adsp: unknown dsp cmd_type %d\n", cmd_type);
+		pr_err("unknown dsp cmd_type %d\n", cmd_type);
 		rc = -EIO;
 		goto done;
 	}
@@ -950,7 +952,7 @@ static irqreturn_t adsp_irq_handler(int irq, void *data)
 		info->event_backlog_max = cnt;
 	info->events_received += cnt;
 	if (cnt == 10)
-		pr_err("adsp: too many (%d) events for single irq!\n", cnt);
+		pr_err("too many (%d) events for single irq!\n", cnt);
 	return IRQ_HANDLED;
 }
 
@@ -966,8 +968,8 @@ int msm_adsp_enable(struct msm_adsp_module *module)
 {
 	int rc = 0;
 
-	pr_info("msm_adsp_enable() '%s'state[%d] id[%d]\n",
-		module->name, module->state, module->id);
+	pr_info("%s(): '%s'state[%d] id[%d]\n",
+		__func__, module->name, module->state, module->id);
 
 	mutex_lock(&module->lock);
 	switch (module->state) {
@@ -985,21 +987,21 @@ int msm_adsp_enable(struct msm_adsp_module *module)
 		if (module->state == ADSP_STATE_ENABLED) {
 			rc = 0;
 		} else {
-			pr_err("adsp: module '%s' enable timed out\n",
+			pr_err("module '%s' enable timed out\n",
 			       module->name);
 			rc = -ETIMEDOUT;
 		}
 		break;
 	case ADSP_STATE_ENABLING:
-		pr_warning("adsp: module '%s' enable in progress\n",
+		pr_warning("module '%s' enable in progress\n",
 			   module->name);
 		break;
 	case ADSP_STATE_ENABLED:
-		pr_warning("adsp: module '%s' already enabled\n",
+		pr_warning("module '%s' already enabled\n",
 			   module->name);
 		break;
 	case ADSP_STATE_DISABLING:
-		pr_err("adsp: module '%s' disable in progress\n",
+		pr_err("module '%s' disable in progress\n",
 		       module->name);
 		rc = -EBUSY;
 		break;
@@ -1015,7 +1017,7 @@ static int msm_adsp_disable_locked(struct msm_adsp_module *module)
 
 	switch (module->state) {
 	case ADSP_STATE_DISABLED:
-		pr_warning("adsp: module '%s' already disabled\n",
+		pr_warning("module '%s' already disabled\n",
 			   module->name);
 		break;
 	case ADSP_STATE_ENABLING:
@@ -1030,7 +1032,7 @@ static int msm_adsp_disable_locked(struct msm_adsp_module *module)
 int msm_adsp_disable(struct msm_adsp_module *module)
 {
 	int rc;
-	pr_info("msm_adsp_disable() '%s'\n", module->name);
+	pr_info("%s(): '%s'\n", __func__, module->name);
 	mutex_lock(&module->lock);
 	rc = msm_adsp_disable_locked(module);
 	mutex_unlock(&module->lock);
@@ -1044,7 +1046,7 @@ static int msm_adsp_probe(struct platform_device *pdev)
 	int rc, i;
 	int max_module_id;
 
-	pr_info("adsp: probe\n");
+	pr_info("probe\n");
 
 	wake_lock_init(&adsp_wake_lock, WAKE_LOCK_SUSPEND, "adsp");
 #if CONFIG_MSM_AMSS_VERSION >= 6350
@@ -1088,7 +1090,7 @@ static int msm_adsp_probe(struct platform_device *pdev)
 	if (IS_ERR(rpc_cb_server_client)) {
 		rpc_cb_server_client = NULL;
 		rc = PTR_ERR(rpc_cb_server_client);
-		pr_err("adsp: could not create rpc server (%d)\n", rc);
+		pr_err("could not create rpc server (%d)\n", rc);
 		goto fail_rpc_open;
 	}
 
@@ -1096,7 +1098,7 @@ static int msm_adsp_probe(struct platform_device *pdev)
 				     RPC_ADSP_RTOS_MTOA_PROG,
 				     RPC_ADSP_RTOS_MTOA_VERS);
 	if (rc) {
-		pr_err("adsp: could not register callback server (%d)\n", rc);
+		pr_err("could not register callback server (%d)\n", rc);
 		goto fail_rpc_register;
 	}
 
diff --git a/drivers/staging/dream/qdsp5/adsp_driver.c b/drivers/staging/dream/qdsp5/adsp_driver.c
index e55a0db..c45679b 100644
--- a/drivers/staging/dream/qdsp5/adsp_driver.c
+++ b/drivers/staging/dream/qdsp5/adsp_driver.c
@@ -91,15 +91,12 @@ static int adsp_pmem_check(struct msm_adsp_module *module,
 	hlist_for_each_entry(region_elt, node, &module->pmem_regions, list) {
 		if (CONTAINS(region_elt, &t) || CONTAINS(&t, region_elt) ||
 		    OVERLAPS(region_elt, &t)) {
-			printk(KERN_ERR "adsp: module %s:"
-				" region (vaddr %p len %ld)"
-				" clashes with registered region"
-				" (vaddr %p paddr %p len %ld)\n",
-				module->name,
-				vaddr, len,
-				region_elt->vaddr,
-				(void *)region_elt->paddr,
-				region_elt->len);
+			pr_err("module %s: region (vaddr %p len %ld) clashes with registered region (vaddr %p paddr %p len %ld)\n",
+			       module->name,
+			       vaddr, len,
+			       region_elt->vaddr,
+			       (void *)region_elt->paddr,
+			       region_elt->len);
 			return -EINVAL;
 		}
 	}
@@ -173,18 +170,17 @@ static int adsp_pmem_lookup_vaddr(struct msm_adsp_module *module, void **addr,
 	}
 
 	if (match_count > 1) {
-		printk(KERN_ERR "adsp: module %s: "
-			"multiple hits for vaddr %p, len %ld\n",
-			module->name, vaddr, len);
+		pr_err("module %s: multiple hits for vaddr %p, len %ld\n",
+		       module->name, vaddr, len);
 		hlist_for_each_entry(region_elt, node,
 				&module->pmem_regions, list) {
 			if (vaddr >= region_elt->vaddr &&
 			    vaddr < region_elt->vaddr + region_elt->len &&
 			    vaddr + len <= region_elt->vaddr + region_elt->len)
-				printk(KERN_ERR "\t%p, %ld --> %p\n",
-					region_elt->vaddr,
-					region_elt->len,
-					(void *)region_elt->paddr);
+				pr_err("\t%p, %ld --> %p\n",
+				       region_elt->vaddr,
+				       region_elt->len,
+				       (void *)region_elt->paddr);
 		}
 	}
 
@@ -201,9 +197,8 @@ int adsp_pmem_fixup_kvaddr(struct msm_adsp_module *module, void **addr,
 
 	ret = adsp_pmem_lookup_vaddr(module, addr, len, &region);
 	if (ret) {
-		printk(KERN_ERR "adsp: not patching %s (paddr & kvaddr),"
-			" lookup (%p, %ld) failed\n",
-			module->name, vaddr, len);
+		pr_err("not patching %s (paddr & kvaddr), lookup (%p, %ld) failed\n",
+		       module->name, vaddr, len);
 		return ret;
 	}
 	*paddr = region->paddr + (vaddr - region->vaddr);
@@ -221,8 +216,8 @@ int adsp_pmem_fixup(struct msm_adsp_module *module, void **addr,
 
 	ret = adsp_pmem_lookup_vaddr(module, addr, len, &region);
 	if (ret) {
-		printk(KERN_ERR "adsp: not patching %s, lookup (%p, %ld) failed\n",
-			module->name, vaddr, len);
+		pr_err("not patching %s, lookup (%p, %ld) failed\n",
+		       module->name, vaddr, len);
 		return ret;
 	}
 
@@ -239,8 +234,7 @@ static int adsp_verify_cmd(struct msm_adsp_module *module,
 		return module->verify_cmd(module, queue_id, cmd_data,
 					     cmd_size);
 	else
-		printk(KERN_INFO "adsp: no packet verifying function "
-				 "for task %s\n", module->name);
+		pr_info("no packet verifying function for task %s\n", module->name);
 	return 0;
 }
 
@@ -269,8 +263,7 @@ static long adsp_write_cmd(struct adsp_device *adev, void __user *arg)
 
 	mutex_lock(&adev->module->pmem_regions_lock);
 	if (adsp_verify_cmd(adev->module, cmd.queue, cmd_data, cmd.len)) {
-		printk(KERN_ERR "module %s: verify failed.\n",
-			adev->module->name);
+		pr_err("module %s: verify failed.\n", adev->module->name);
 		rc = -EINVAL;
 		goto end;
 	}
@@ -320,8 +313,8 @@ int adsp_pmem_paddr_fixup(struct msm_adsp_module *module, void **addr)
 
 	ret = adsp_pmem_lookup_paddr(module, addr, &region);
 	if (ret) {
-		printk(KERN_ERR "adsp: not patching %s, paddr %p lookup failed\n",
-			module->name, vaddr);
+		pr_err("not patching %s, paddr %p lookup failed\n",
+		       module->name, vaddr);
 		return ret;
 	}
 
@@ -427,7 +420,7 @@ static long adsp_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 		return 0;
 
 	case ADSP_IOCTL_DISABLE_ACK:
-		pr_err("adsp: ADSP_IOCTL_DISABLE_ACK is not implemented.\n");
+		pr_err("ADSP_IOCTL_DISABLE_ACK is not implemented.\n");
 		break;
 
 	case ADSP_IOCTL_WRITE_COMMAND:
@@ -470,7 +463,7 @@ static int adsp_release(struct inode *inode, struct file *filp)
 	struct hlist_node *node, *tmp;
 	struct adsp_pmem_region *region;
 
-	pr_info("adsp_release() '%s'\n", adev->name);
+	pr_info("%s(): '%s'\n", __func__, adev->name);
 
 	/* clear module before putting it to avoid race with open() */
 	adev->module = NULL;
@@ -497,13 +490,13 @@ static void adsp_event(void *driver_data, unsigned id, size_t len,
 	unsigned long flags;
 
 	if (len > ADSP_EVENT_MAX_SIZE) {
-		pr_err("adsp_event: event too large (%d bytes)\n", len);
+		pr_err("%s(): event too large (%d bytes)\n", __func__, len);
 		return;
 	}
 
 	event = kmalloc(sizeof(*event), GFP_ATOMIC);
 	if (!event) {
-		pr_err("adsp_event: cannot allocate buffer\n");
+		pr_err("%s(): cannot allocate buffer\n", __func__);
 		return;
 	}
 
@@ -545,13 +538,13 @@ static int adsp_open(struct inode *inode, struct file *filp)
 	if (!adev)
 		return -ENODEV;
 
-	pr_info("adsp_open() name = '%s'\n", adev->name);
+	pr_info("%s(): name = '%s'\n", __func__, adev->name);
 
 	rc = msm_adsp_get(adev->name, &adev->module, &adsp_ops, adev);
 	if (rc)
 		return rc;
 
-	pr_info("adsp_open() module '%s' adev %p\n", adev->name, adev);
+	pr_info("%s(): module '%s' adev %p\n", __func__, adev->name, adev);
 	filp->private_data = adev;
 	adev->abort = 0;
 	INIT_HLIST_HEAD(&adev->module->pmem_regions);
diff --git a/drivers/staging/dream/qdsp5/adsp_jpeg_verify_cmd.c b/drivers/staging/dream/qdsp5/adsp_jpeg_verify_cmd.c
index b33eba2..3b5e21a 100644
--- a/drivers/staging/dream/qdsp5/adsp_jpeg_verify_cmd.c
+++ b/drivers/staging/dream/qdsp5/adsp_jpeg_verify_cmd.c
@@ -16,6 +16,8 @@
  *
  */
 
+#define pr_fmt(fmt) "adsp: " fmt
+
 #include <mach/qdsp5/qdsp5jpegcmdi.h>
 #include "adsp.h"
 
@@ -45,8 +47,8 @@ static inline int verify_jpeg_cmd_enc_cfg(struct msm_adsp_module *module,
 	int i, num_frags;
 
 	if (cmd_size != sizeof(jpeg_cmd_enc_cfg)) {
-		printk(KERN_ERR "adsp: module %s: JPEG ENC CFG invalid cmd_size %d\n",
-			module->name, cmd_size);
+		pr_err("module %s: JPEG ENC CFG invalid cmd_size %d\n",
+		       module->name, cmd_size);
 		return -1;
 	}
 
@@ -74,8 +76,8 @@ static inline int verify_jpeg_cmd_dec_cfg(struct msm_adsp_module *module,
 	uint32_t div;
 
 	if (cmd_size != sizeof(jpeg_cmd_dec_cfg)) {
-		printk(KERN_ERR "adsp: module %s: JPEG DEC CFG invalid cmd_size %d\n",
-			module->name, cmd_size);
+		pr_err("module %s: JPEG DEC CFG invalid cmd_size %d\n",
+		       module->name, cmd_size);
 		return -1;
 	}
 
@@ -108,7 +110,8 @@ static int verify_jpeg_cfg_cmd(struct msm_adsp_module *module,
 		return verify_jpeg_cmd_dec_cfg(module, cmd_data, cmd_size);
 	default:
 		if (cmd_id > 1) {
-			printk(KERN_ERR "adsp: module %s: invalid JPEG CFG cmd_id %d\n", module->name, cmd_id);
+			pr_err("module %s: invalid JPEG CFG cmd_id %d\n",
+			       module->name, cmd_id);
 			return -1;
 		}
 	}
@@ -126,8 +129,8 @@ static int verify_jpeg_action_cmd(struct msm_adsp_module *module,
 			(jpeg_cmd_enc_op_consumed *)cmd_data;
 
 		if (cmd_size != sizeof(jpeg_cmd_enc_op_consumed)) {
-			printk(KERN_ERR "adsp: module %s: JPEG_CMD_ENC_OP_CONSUMED invalid size %d\n",
-				module->name, cmd_size);
+			pr_err("module %s: JPEG_CMD_ENC_OP_CONSUMED invalid size %d\n",
+			       module->name, cmd_size);
 			return -1;
 		}
 
@@ -143,8 +146,8 @@ static int verify_jpeg_action_cmd(struct msm_adsp_module *module,
 			(jpeg_cmd_dec_op_consumed *)cmd_data;
 
 		if (cmd_size != sizeof(jpeg_cmd_enc_op_consumed)) {
-			printk(KERN_ERR "adsp: module %s: JPEG_CMD_DEC_OP_CONSUMED invalid size %d\n",
-				module->name, cmd_size);
+			pr_err("module %s: JPEG_CMD_DEC_OP_CONSUMED invalid size %d\n",
+			       module->name, cmd_size);
 			return -1;
 		}
 
@@ -158,8 +161,8 @@ static int verify_jpeg_action_cmd(struct msm_adsp_module *module,
 	break;
 	default:
 		if (cmd_id > 7) {
-			printk(KERN_ERR "adsp: module %s: invalid cmd_id %d\n",
-				module->name, cmd_id);
+			pr_err("module %s: invalid cmd_id %d\n",
+			       module->name, cmd_id);
 			return -1;
 		}
 	}
diff --git a/drivers/staging/dream/qdsp5/adsp_lpm_verify_cmd.c b/drivers/staging/dream/qdsp5/adsp_lpm_verify_cmd.c
index 1e23ef3..b5f9e64 100644
--- a/drivers/staging/dream/qdsp5/adsp_lpm_verify_cmd.c
+++ b/drivers/staging/dream/qdsp5/adsp_lpm_verify_cmd.c
@@ -16,6 +16,8 @@
  *
  */
 
+#define pr_fmt(fmt) "adsp: " fmt
+
 #include <mach/qdsp5/qdsp5lpmcmdi.h>
 #include "adsp.h"
 
@@ -29,8 +31,8 @@ int adsp_lpm_verify_cmd(struct msm_adsp_module *module,
 	lpm_cmd_start *cmd;
 
 	if (queue_id != QDSP_lpmCommandQueue) {
-		printk(KERN_ERR "adsp: module %s: wrong queue id %d\n",
-			module->name, queue_id);
+		pr_err("module %s: wrong queue id %d\n",
+		       module->name, queue_id);
 		return -1;
 	}
 
@@ -39,8 +41,8 @@ int adsp_lpm_verify_cmd(struct msm_adsp_module *module,
 
 	if (cmd_id == LPM_CMD_START) {
 		if (cmd_size != sizeof(lpm_cmd_start)) {
-			printk(KERN_ERR "adsp: module %s: wrong size %d, expect %d\n",
-				module->name, cmd_size, sizeof(lpm_cmd_start));
+			pr_err("module %s: wrong size %d, expect %d\n",
+			       module->name, cmd_size, sizeof(lpm_cmd_start));
 			return -1;
 		}
 		col_height = cmd->ip_data_cfg_part1 & size_mask;
@@ -56,8 +58,8 @@ int adsp_lpm_verify_cmd(struct msm_adsp_module *module,
 				    output_size)))
 			return -1;
 	} else if (cmd_id > 1) {
-		printk(KERN_ERR "adsp: module %s: invalid cmd_id %d\n",
-			module->name, cmd_id);
+		pr_err("module %s: invalid cmd_id %d\n",
+		       module->name, cmd_id);
 		return -1;
 	}
 	return 0;
diff --git a/drivers/staging/dream/qdsp5/adsp_vfe_verify_cmd.c b/drivers/staging/dream/qdsp5/adsp_vfe_verify_cmd.c
index 927d50a..2a00078 100644
--- a/drivers/staging/dream/qdsp5/adsp_vfe_verify_cmd.c
+++ b/drivers/staging/dream/qdsp5/adsp_vfe_verify_cmd.c
@@ -16,6 +16,8 @@
  *
  */
 
+#define pr_fmt(fmt) "adsp: " fmt
+
 #include <mach/qdsp5/qdsp5vfecmdi.h>
 #include "adsp.h"
 
@@ -123,7 +125,7 @@ static int verify_vfe_command(struct msm_adsp_module *module,
 		return verify_cmd_stats_wb_exp_ack(module, cmd_data, cmd_size);
 	default:
 		if (cmd_id > 29) {
-			printk(KERN_ERR "adsp: module %s: invalid VFE command id %d\n", module->name, cmd_id);
+			pr_err("module %s: invalid VFE command id %d\n", module->name, cmd_id);
 			return -1;
 		}
 	}
@@ -136,7 +138,8 @@ static int verify_vfe_command_scale(struct msm_adsp_module *module,
 	uint32_t cmd_id = ((uint32_t *)cmd_data)[0];
 	// FIXME: check the size
 	if (cmd_id > 1) {
-		printk(KERN_ERR "adsp: module %s: invalid VFE SCALE command id %d\n", module->name, cmd_id);
+		pr_err("module %s: invalid VFE SCALE command id %d\n",
+		       module->name, cmd_id);
 		return -1;
 	}
 	return 0;
@@ -166,8 +169,8 @@ static int verify_vfe_command_table(struct msm_adsp_module *module,
 		vfe_cmd_axi_ip_cfg *cmd = (vfe_cmd_axi_ip_cfg *)cmd_data;
 		uint32_t size;
 		if (cmd_size != sizeof(vfe_cmd_axi_ip_cfg)) {
-			printk(KERN_ERR "adsp: module %s: invalid VFE TABLE (VFE_CMD_AXI_IP_CFG) command size %d\n",
-				module->name, cmd_size);
+			pr_err("module %s: invalid VFE TABLE (VFE_CMD_AXI_IP_CFG) command size %d\n",
+			       module->name, cmd_size);
 			return -1;
 		}
 		size = get_size(cmd->ip_cfg_part2);
@@ -185,8 +188,8 @@ static int verify_vfe_command_table(struct msm_adsp_module *module,
 		void **addr1_y, **addr2_y, **addr1_cbcr, **addr2_cbcr;
 
 		if (cmd_size != sizeof(vfe_cmd_axi_op_cfg)) {
-			printk(KERN_ERR "adsp: module %s: invalid VFE TABLE (VFE_CMD_AXI_OP_CFG) command size %d\n",
-				module->name, cmd_size);
+			pr_err("module %s: invalid VFE TABLE (VFE_CMD_AXI_OP_CFG) command size %d\n",
+			       module->name, cmd_size);
 			return -1;
 		}
 		size1_y = get_size(cmd->op1_y_cfg_part2);
@@ -212,8 +215,8 @@ static int verify_vfe_command_table(struct msm_adsp_module *module,
 	}
 	default:
 		if (cmd_id > 4) {
-			printk(KERN_ERR "adsp: module %s: invalid VFE TABLE command id %d\n",
-				module->name, cmd_id);
+			pr_err("module %s: invalid VFE TABLE command id %d\n",
+			       module->name, cmd_id);
 			return -1;
 		}
 	}
@@ -232,8 +235,8 @@ int adsp_vfe_verify_cmd(struct msm_adsp_module *module,
 	case QDSP_vfeCommandTableQueue:
 		return verify_vfe_command_table(module, cmd_data, cmd_size);
 	default:
-		printk(KERN_ERR "adsp: module %s: unknown queue id %d\n",
-			module->name, queue_id);
+		pr_err("module %s: unknown queue id %d\n",
+		       module->name, queue_id);
 		return -1;
 	}
 }
diff --git a/drivers/staging/dream/qdsp5/adsp_video_verify_cmd.c b/drivers/staging/dream/qdsp5/adsp_video_verify_cmd.c
index 53aff77..ec13015 100644
--- a/drivers/staging/dream/qdsp5/adsp_video_verify_cmd.c
+++ b/drivers/staging/dream/qdsp5/adsp_video_verify_cmd.c
@@ -1,6 +1,6 @@
 /* arch/arm/mach-msm/qdsp5/adsp_video_verify_cmd.c
  *
- * Verificion code for aDSP VDEC packets from userspace.
+ * Verification code for aDSP VDEC packets from userspace.
  *
  * Copyright (c) 2008 QUALCOMM Incorporated
  * Copyright (C) 2008 Google, Inc.
@@ -15,12 +15,15 @@
  * GNU General Public License for more details.
  *
  */
+
+#define pr_fmt(fmt) "adsp_video: " fmt
+
 #include <linux/io.h>
 
 #define ADSP_DEBUG_MSGS 0
 #if ADSP_DEBUG_MSGS
 #define DLOG(fmt,args...) \
-	do { printk(KERN_INFO "[%s:%s:%d] "fmt, __FILE__, __func__, __LINE__, \
+	do { pr_info("[%s:%s:%d] " fmt, __FILE__, __func__, __LINE__,	\
 	     ##args); } \
 	while (0)
 #else
@@ -87,8 +90,7 @@ static int verify_vdec_pkt_cmd(struct msm_adsp_module *module,
 
 	DLOG("cmd_size %d cmd_id %d cmd_data %x\n", cmd_size, cmd_id, cmd_data);
 	if (cmd_id != VIDDEC_CMD_SUBFRAME_PKT) {
-		printk(KERN_INFO "adsp_video: unknown video packet %u\n",
-			cmd_id);
+		pr_info("unknown video packet %u\n", cmd_id);
 		return 0;
 	}
 	if (cmd_size < sizeof(viddec_cmd_subframe_pkt))
@@ -156,7 +158,7 @@ int adsp_video_verify_cmd(struct msm_adsp_module *module,
 		DLOG("\n");
 		return verify_vdec_pkt_cmd(module, cmd_data, cmd_size);
 	default:
-		printk(KERN_INFO "unknown video queue %u\n", queue_id);
+		pr_info("unknown video queue %u\n", queue_id);
 		return 0;
 	}
 }
diff --git a/drivers/staging/dream/qdsp5/adsp_videoenc_verify_cmd.c b/drivers/staging/dream/qdsp5/adsp_videoenc_verify_cmd.c
index ee37449..7752738 100644
--- a/drivers/staging/dream/qdsp5/adsp_videoenc_verify_cmd.c
+++ b/drivers/staging/dream/qdsp5/adsp_videoenc_verify_cmd.c
@@ -15,12 +15,15 @@
  * GNU General Public License for more details.
  *
  */
+
+#define pr_fmt(fmt) "adsp_video: " fmt
+
 #include <linux/io.h>
 
 #define ADSP_DEBUG_MSGS 0
 #if ADSP_DEBUG_MSGS
 #define DLOG(fmt,args...) \
-	do { printk(KERN_INFO "[%s:%s:%d] "fmt, __FILE__, __func__, __LINE__, \
+	do { pr_info("[%s:%s:%d] " fmt, __FILE__, __func__, __LINE__,	\
 	     ##args); } \
 	while (0)
 #else
@@ -210,7 +213,7 @@ static int verify_venc_cmd(struct msm_adsp_module *module,
 			return -1;
 		break;
 	default:
-		printk(KERN_INFO "adsp_video:unknown encoder video command %u\n",
+		pr_info("unknown encoder video command %u\n",
 			cmd_id);
 		return 0;
 	}
@@ -228,7 +231,7 @@ int adsp_videoenc_verify_cmd(struct msm_adsp_module *module,
 		DLOG("\n");
 		return verify_venc_cmd(module, cmd_data, cmd_size);
 	default:
-		printk(KERN_INFO "unknown video queue %u\n", queue_id);
+		pr_info("unknown video queue %u\n", queue_id);
 		return 0;
 	}
 }
diff --git a/drivers/staging/dream/qdsp5/audio_aac.c b/drivers/staging/dream/qdsp5/audio_aac.c
index ad2390f..dc367bb 100644
--- a/drivers/staging/dream/qdsp5/audio_aac.c
+++ b/drivers/staging/dream/qdsp5/audio_aac.c
@@ -17,6 +17,8 @@
  *
  */
 
+#define pr_fmt(fmt) "audio: " fmt
+
 #include <linux/module.h>
 #include <linux/fs.h>
 #include <linux/miscdevice.h>
@@ -43,9 +45,10 @@
 
 #ifdef DEBUG
 #define dprintk(format, arg...) \
-printk(KERN_DEBUG format, ## arg)
+	printk(KERN_DEBUG "%s(): " format, __func__, ## arg)
 #else
-#define dprintk(format, arg...) do {} while (0)
+#define dprintk(format, arg...) \
+	do { if (0) printk(KERN_DEBUG format, ## arg); } while (0)
 #endif
 
 #define BUFSZ 32768
@@ -142,7 +145,7 @@ static int audio_enable(struct audio *audio)
 	struct audmgr_config cfg;
 	int rc;
 
-	dprintk("audio_enable()\n");
+	dprintk("\n");
 
 	if (audio->enabled)
 		return 0;
@@ -161,13 +164,13 @@ static int audio_enable(struct audio *audio)
 		return rc;
 
 	if (msm_adsp_enable(audio->audplay)) {
-		pr_err("audio: msm_adsp_enable(audplay) failed\n");
+		pr_err("msm_adsp_enable(audplay) failed\n");
 		audmgr_disable(&audio->audmgr);
 		return -ENODEV;
 	}
 
 	if (audpp_enable(audio->dec_id, audio_dsp_event, audio)) {
-		pr_err("audio: audpp_enable() failed\n");
+		pr_err("audpp_enable() failed\n");
     msm_adsp_disable(audio->audplay);
 		audmgr_disable(&audio->audmgr);
 		return -ENODEV;
@@ -179,7 +182,7 @@ static int audio_enable(struct audio *audio)
 /* must be called with audio->lock held */
 static int audio_disable(struct audio *audio)
 {
-	dprintk("audio_disable()\n");
+	dprintk("\n");
 	if (audio->enabled) {
 		audio->enabled = 0;
 		auddec_dsp_config(audio, 0);
@@ -206,7 +209,7 @@ static void audio_update_pcm_buf_entry(struct audio *audio, uint32_t *payload)
 	for (index = 0; index < payload[1]; index++) {
 		if (audio->in[audio->fill_next].addr ==
 		    payload[2 + index * 2]) {
-			dprintk("audio_update_pcm_buf_entry: in[%d] ready\n",
+			dprintk("in[%d] ready\n",
 				audio->fill_next);
 			audio->in[audio->fill_next].used =
 				payload[3 + index * 2];
@@ -214,17 +217,16 @@ static void audio_update_pcm_buf_entry(struct audio *audio, uint32_t *payload)
 				audio->fill_next = 0;
 
 		} else {
-			pr_err
-			    ("audio_update_pcm_buf_entry: expected=%x ret=%x\n"
-			     , audio->in[audio->fill_next].addr,
-			     payload[1 + index * 2]);
+			pr_err("%s(): expected=%x ret=%x\n",
+			       __func__, audio->in[audio->fill_next].addr,
+			       payload[1 + index * 2]);
 			break;
 		}
 	}
 	if (audio->in[audio->fill_next].used == 0) {
 		audplay_buffer_refresh(audio);
 	} else {
-		dprintk("audio_update_pcm_buf_entry: read cannot keep up\n");
+		dprintk("read cannot keep up\n");
 		audio->buf_refresh = 1;
 	}
 	wake_up(&audio->read_wait);
@@ -239,7 +241,7 @@ static void audplay_dsp_event(void *data, unsigned id, size_t len,
 	uint32_t msg[28];
 	getevent(msg, sizeof(msg));
 
-	dprintk("audplay_dsp_event: msg_id=%x\n", id);
+	dprintk("msg_id=%x\n", id);
 
 	switch (id) {
 	case AUDPLAY_MSG_DEC_NEEDS_DATA:
@@ -251,7 +253,7 @@ static void audplay_dsp_event(void *data, unsigned id, size_t len,
 		break;
 
 	default:
-		pr_err("unexpected message from decoder \n");
+		pr_err("unexpected message from decoder\n");
 	}
 }
 
@@ -265,32 +267,32 @@ static void audio_dsp_event(void *private, unsigned id, uint16_t *msg)
 
 			switch (status) {
 			case AUDPP_DEC_STATUS_SLEEP:
-				dprintk("decoder status: sleep \n");
+				dprintk("sleep\n");
 				break;
 
 			case AUDPP_DEC_STATUS_INIT:
-				dprintk("decoder status: init \n");
+				dprintk("init\n");
 				audpp_cmd_cfg_routing_mode(audio);
 				break;
 
 			case AUDPP_DEC_STATUS_CFG:
-				dprintk("decoder status: cfg \n");
+				dprintk("cfg\n");
 				break;
 			case AUDPP_DEC_STATUS_PLAY:
-				dprintk("decoder status: play \n");
+				dprintk("play\n");
 				if (audio->pcm_feedback) {
 					audplay_config_hostpcm(audio);
 					audplay_buffer_refresh(audio);
 				}
 				break;
 			default:
-				pr_err("unknown decoder status \n");
+				pr_err("unknown decoder status\n");
 			}
 			break;
 		}
 	case AUDPP_MSG_CFG_MSG:
 		if (msg[0] == AUDPP_MSG_ENA_ENA) {
-			dprintk("audio_dsp_event: CFG_MSG ENABLE\n");
+			dprintk("CFG_MSG ENABLE\n");
 			auddec_dsp_config(audio, 1);
 			audio->out_needed = 0;
 			audio->running = 1;
@@ -298,20 +300,20 @@ static void audio_dsp_event(void *private, unsigned id, uint16_t *msg)
 						 0);
 			audpp_avsync(audio->dec_id, 22050);
 		} else if (msg[0] == AUDPP_MSG_ENA_DIS) {
-			dprintk("audio_dsp_event: CFG_MSG DISABLE\n");
+			dprintk("CFG_MSG DISABLE\n");
 			audpp_avsync(audio->dec_id, 0);
 			audio->running = 0;
 		} else {
-			pr_err("audio_dsp_event: CFG_MSG %d?\n", msg[0]);
+			pr_err("%s(): CFG_MSG %d?\n", __func__, msg[0]);
 		}
 		break;
 	case AUDPP_MSG_ROUTING_ACK:
-		dprintk("audio_dsp_event: ROUTING_ACK mode=%d\n", msg[1]);
+		dprintk("ROUTING_ACK mode=%d\n", msg[1]);
 		audpp_cmd_cfg_adec_params(audio);
 		break;
 
 	case AUDPP_MSG_FLUSH_ACK:
-		dprintk("%s: FLUSH_ACK\n", __func__);
+		dprintk("FLUSH_ACK\n");
 		audio->wflush = 0;
 		audio->rflush = 0;
 		if (audio->pcm_feedback)
@@ -319,7 +321,7 @@ static void audio_dsp_event(void *private, unsigned id, uint16_t *msg)
 		break;
 
 	default:
-		pr_err("audio_dsp_event: UNKNOWN (%d)\n", id);
+		pr_err("%s(): UNKNOWN (%d)\n", __func__, id);
 	}
 
 }
@@ -375,7 +377,7 @@ static void audpp_cmd_cfg_adec_params(struct audio *audio)
 static void audpp_cmd_cfg_routing_mode(struct audio *audio)
 {
 	struct audpp_cmd_routing_mode cmd;
-	dprintk("audpp_cmd_cfg_routing_mode()\n");
+	dprintk("\n");
 	memset(&cmd, 0, sizeof(cmd));
 	cmd.cmd_id = AUDPP_CMD_ROUTING_MODE;
 	cmd.object_number = audio->dec_id;
@@ -410,7 +412,7 @@ static void audplay_buffer_refresh(struct audio *audio)
 	refresh_cmd.buf0_length = audio->in[audio->fill_next].size -
 		(audio->in[audio->fill_next].size % 1024); /* AAC frame size */
 	refresh_cmd.buf_read_count = 0;
-	dprintk("audplay_buffer_fresh: buf0_addr=%x buf0_len=%d\n",
+	dprintk("buf0_addr=%x buf0_len=%d\n",
 		refresh_cmd.buf0_address, refresh_cmd.buf0_length);
 	(void)audplay_send_queue0(audio, &refresh_cmd, sizeof(refresh_cmd));
 }
@@ -419,7 +421,7 @@ static void audplay_config_hostpcm(struct audio *audio)
 {
 	struct audplay_cmd_hpcm_buf_cfg cfg_cmd;
 
-	dprintk("audplay_config_hostpcm()\n");
+	dprintk("\n");
 	cfg_cmd.cmd_id = AUDPLAY_CMD_HPCM_BUF_CFG;
 	cfg_cmd.max_buffers = audio->pcm_buf_count;
 	cfg_cmd.byte_swap = 0;
@@ -584,7 +586,7 @@ static long audio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	struct audio *audio = file->private_data;
 	int rc = 0;
 
-	dprintk("audio_ioctl() cmd = %d\n", cmd);
+	dprintk("cmd = %d\n", cmd);
 
 	if (cmd == AUDIO_GET_STATS) {
 		struct msm_audio_stats stats;
@@ -615,7 +617,7 @@ static long audio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		audio->stopped = 0;
 		break;
 	case AUDIO_FLUSH:
-		dprintk("%s: AUDIO_FLUSH\n", __func__);
+		dprintk("AUDIO_FLUSH\n");
 		audio->rflush = 1;
 		audio->wflush = 1;
 		audio_ioport_reset(audio);
@@ -729,7 +731,7 @@ static long audio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 
 			/* Check if pcm feedback is required */
 			if ((config.pcm_feedback) && (!audio->read_data)) {
-				dprintk("ioctl: allocate PCM buffer %d\n",
+				dprintk("allocate PCM buffer %d\n",
 					config.buffer_count *
 					config.buffer_size);
 				audio->read_data =
@@ -739,7 +741,7 @@ static long audio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 						       &audio->read_phys,
 						       GFP_KERNEL);
 				if (!audio->read_data) {
-					pr_err("audio_aac: buf alloc fail\n");
+					pr_err("buf alloc fail\n");
 					rc = -1;
 				} else {
 					uint8_t index;
@@ -771,7 +773,7 @@ static long audio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 			break;
 		}
 	case AUDIO_PAUSE:
-		dprintk("%s: AUDIO_PAUSE %ld\n", __func__, arg);
+		dprintk("AUDIO_PAUSE %ld\n", arg);
 		rc = audpp_pause(audio->dec_id, (int) arg);
 		break;
 	default:
@@ -792,7 +794,7 @@ static ssize_t audio_read(struct file *file, char __user *buf, size_t count,
 		return 0; /* PCM feedback is not enabled. Nothing to read */
 
 	mutex_lock(&audio->read_lock);
-	dprintk("audio_read() %d \n", count);
+	dprintk("%d\n", count);
 	while (count > 0) {
 		rc = wait_event_interruptible(audio->read_wait,
 					      (audio->in[audio->read_next].
@@ -811,16 +813,16 @@ static ssize_t audio_read(struct file *file, char __user *buf, size_t count,
 			/* Read must happen in frame boundary. Since driver
 			   does not know frame size, read count must be greater
 			   or equal to size of PCM samples */
-			dprintk("audio_read: no partial frame done reading\n");
+			dprintk("no partial frame done reading\n");
 			break;
 		} else {
-			dprintk("audio_read: read from in[%d]\n",
+			dprintk("read from in[%d]\n",
 				audio->read_next);
 			if (copy_to_user
 			    (buf, audio->in[audio->read_next].data,
 			     audio->in[audio->read_next].used)) {
-				pr_err("audio_read: invalid addr %x \n",
-				       (unsigned int)buf);
+				pr_err("%s(): invalid addr %x\n",
+				       __func__, (unsigned int)buf);
 				rc = -EFAULT;
 				break;
 			}
@@ -843,7 +845,7 @@ static ssize_t audio_read(struct file *file, char __user *buf, size_t count,
 	 */
 	if (audio->buf_refresh && !audio->rflush) {
 		audio->buf_refresh = 0;
-		dprintk("audio_read: kick start pcm feedback again\n");
+		dprintk("kick start pcm feedback again\n");
 		audplay_buffer_refresh(audio);
 	}
 
@@ -852,7 +854,7 @@ static ssize_t audio_read(struct file *file, char __user *buf, size_t count,
 	if (buf > start)
 		rc = buf - start;
 
-	dprintk("audio_read: read %d bytes\n", rc);
+	dprintk("read %d bytes\n", rc);
 	return rc;
 }
 
@@ -884,8 +886,7 @@ static ssize_t audio_write(struct file *file, const char __user *buf,
 		}
 
 		if (audio->reserved) {
-			dprintk("%s: append reserved byte %x\n",
-				__func__, audio->rsv_byte);
+			dprintk("append reserved byte %x\n", audio->rsv_byte);
 			*cpy_ptr = audio->rsv_byte;
 			xfer = (count > (frame->size - 1)) ?
 				frame->size - 1 : count;
@@ -903,8 +904,8 @@ static ssize_t audio_write(struct file *file, const char __user *buf,
 		dsize += xfer;
 		if (dsize & 1) {
 			audio->rsv_byte = ((char *) frame->data)[dsize - 1];
-			dprintk("%s: odd length buf reserve last byte %x\n",
-				__func__, audio->rsv_byte);
+			dprintk("odd length buf reserve last byte %x\n",
+				audio->rsv_byte);
 			audio->reserved = 1;
 			dsize--;
 		}
@@ -927,7 +928,7 @@ static int audio_release(struct inode *inode, struct file *file)
 {
 	struct audio *audio = file->private_data;
 
-	dprintk("audio_release()\n");
+	dprintk("\n");
 
 	mutex_lock(&audio->lock);
 	audio_disable(audio);
@@ -960,7 +961,7 @@ static int audio_open(struct inode *inode, struct file *file)
 	mutex_lock(&audio->lock);
 
 	if (audio->opened) {
-		pr_err("audio: busy\n");
+		pr_err("busy\n");
 		rc = -EBUSY;
 		goto done;
 	}
@@ -969,7 +970,7 @@ static int audio_open(struct inode *inode, struct file *file)
 		audio->data = dma_alloc_coherent(NULL, DMASZ,
 						 &audio->phys, GFP_KERNEL);
 		if (!audio->data) {
-			pr_err("audio: could not allocate DMA buffers\n");
+			pr_err("could not allocate DMA buffers\n");
 			rc = -ENOMEM;
 			goto done;
 		}
@@ -982,7 +983,7 @@ static int audio_open(struct inode *inode, struct file *file)
 	rc = msm_adsp_get("AUDPLAY0TASK", &audio->audplay,
 			  &audplay_adsp_ops_aac, audio);
 	if (rc) {
-		pr_err("audio: failed to get audplay0 dsp module\n");
+		pr_err("failed to get audplay0 dsp module\n");
 		goto done;
 	}
 	audio->out_sample_rate = 44100;
diff --git a/drivers/staging/dream/qdsp5/audio_in.c b/drivers/staging/dream/qdsp5/audio_in.c
index 3d950a2..fcf764e 100644
--- a/drivers/staging/dream/qdsp5/audio_in.c
+++ b/drivers/staging/dream/qdsp5/audio_in.c
@@ -946,8 +946,7 @@ static int __init audio_in_init(void)
 	the_audio_in.data = dma_alloc_coherent(NULL, DMASZ,
 					       &the_audio_in.phys, GFP_KERNEL);
 	if (!the_audio_in.data) {
-		printk(KERN_ERR "%s: Unable to allocate DMA buffer\n",
-		       __func__);
+		pr_err("%s: Unable to allocate DMA buffer\n", __func__);
 		return -ENOMEM;
 	}
 
diff --git a/drivers/staging/dream/qdsp5/audio_out.c b/drivers/staging/dream/qdsp5/audio_out.c
index d1adcf6..438a796 100644
--- a/drivers/staging/dream/qdsp5/audio_out.c
+++ b/drivers/staging/dream/qdsp5/audio_out.c
@@ -198,7 +198,7 @@ struct audio {
 
 static void audio_prevent_sleep(struct audio *audio)
 {
-	printk(KERN_INFO "++++++++++++++++++++++++++++++\n");
+	pr_info("++++++++++++++++++++++++++++++\n");
 	wake_lock(&audio->wakelock);
 	wake_lock(&audio->idlelock);
 }
@@ -207,7 +207,7 @@ static void audio_allow_sleep(struct audio *audio)
 {
 	wake_unlock(&audio->wakelock);
 	wake_unlock(&audio->idlelock);
-	printk(KERN_INFO "------------------------------\n");
+	pr_info("------------------------------\n");
 }
 
 static int audio_dsp_out_enable(struct audio *audio, int yes);
diff --git a/drivers/staging/dream/qdsp5/audmgr.c b/drivers/staging/dream/qdsp5/audmgr.c
index 1ad8b82..50a8823 100644
--- a/drivers/staging/dream/qdsp5/audmgr.c
+++ b/drivers/staging/dream/qdsp5/audmgr.c
@@ -15,6 +15,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/fs.h>
 #include <linux/uaccess.h>
@@ -61,37 +63,37 @@ static void process_audmgr_callback(struct audmgr *am,
 		if (len < sizeof(uint32_t) * 4)
 			break;
 		am->handle = be32_to_cpu(args->u.handle);
-		pr_info("audmgr: rpc READY handle=0x%08x\n", am->handle);
+		pr_info("rpc READY handle=0x%08x\n", am->handle);
 		break;
 	case RPC_AUDMGR_STATUS_CODEC_CONFIG: {
 		uint32_t volume;
 		if (len < sizeof(uint32_t) * 4)
 			break;
 		volume = be32_to_cpu(args->u.volume);
-		pr_info("audmgr: rpc CODEC_CONFIG volume=0x%08x\n", volume);
+		pr_info("rpc CODEC_CONFIG volume=0x%08x\n", volume);
 		am->state = STATE_ENABLED;
 		wake_up(&am->wait);
 		break;
 	}
 	case RPC_AUDMGR_STATUS_PENDING:
-		pr_err("audmgr: PENDING?\n");
+		pr_err("PENDING?\n");
 		break;
 	case RPC_AUDMGR_STATUS_SUSPEND:
-		pr_err("audmgr: SUSPEND?\n");
+		pr_err("SUSPEND?\n");
 		break;
 	case RPC_AUDMGR_STATUS_FAILURE:
-		pr_err("audmgr: FAILURE\n");
+		pr_err("FAILURE\n");
 		break;
 	case RPC_AUDMGR_STATUS_VOLUME_CHANGE:
-		pr_err("audmgr: VOLUME_CHANGE?\n");
+		pr_err("VOLUME_CHANGE?\n");
 		break;
 	case RPC_AUDMGR_STATUS_DISABLED:
-		pr_err("audmgr: DISABLED\n");
+		pr_err("DISABLED\n");
 		am->state = STATE_DISABLED;
 		wake_up(&am->wait);
 		break;
 	case RPC_AUDMGR_STATUS_ERROR:
-		pr_err("audmgr: ERROR?\n");
+		pr_err("ERROR?\n");
 		am->state = STATE_ERROR;
 		wake_up(&am->wait);
 		break;
@@ -110,14 +112,14 @@ static void process_rpc_request(uint32_t proc, uint32_t xid,
 		int n = len / 4;
 		pr_info("rpc_call proc %d:", proc);
 		while (n--)
-			printk(" %08x", be32_to_cpu(*x++));
-		printk("\n");
+			pr_cont(" %08x", be32_to_cpu(*x++));
+		pr_cont("\n");
 	}
 
 	if (proc == AUDMGR_CB_FUNC_PTR)
 		process_audmgr_callback(am, data, len);
 	else
-		pr_err("audmgr: unknown rpc proc %d\n", proc);
+		pr_err("unknown rpc proc %d\n", proc);
 	rpc_ack(am->ept, xid);
 }
 
@@ -138,7 +140,7 @@ static int audmgr_rpc_thread(void *data)
 	uint32_t type;
 	int len;
 
-	pr_info("audmgr_rpc_thread() start\n");
+	pr_info("%s() start\n", __func__);
 
 	while (!kthread_should_stop()) {
 		if (hdr) {
@@ -147,7 +149,7 @@ static int audmgr_rpc_thread(void *data)
 		}
 		len = msm_rpc_read(am->ept, (void **) &hdr, -1, -1);
 		if (len < 0) {
-			pr_err("audmgr: rpc read failed (%d)\n", len);
+			pr_err("rpc read failed (%d)\n", len);
 			break;
 		}
 		if (len < RPC_COMMON_HDR_SZ)
@@ -162,9 +164,9 @@ static int audmgr_rpc_thread(void *data)
 			status = be32_to_cpu(rep->reply_stat);
 			if (status == RPCMSG_REPLYSTAT_ACCEPTED) {
 				status = be32_to_cpu(rep->data.acc_hdr.accept_stat);
-				pr_info("audmgr: rpc_reply status %d\n", status);
+				pr_info("rpc_reply status %d\n", status);
 			} else {
-				pr_info("audmgr: rpc_reply denied!\n");
+				pr_info("rpc_reply denied!\n");
 			}
 			/* process reply */
 			continue;
@@ -179,7 +181,7 @@ static int audmgr_rpc_thread(void *data)
 				    len - sizeof(*hdr),
 				    data);
 	}
-	pr_info("audmgr_rpc_thread() exit\n");
+	pr_info("%s() exit\n", __func__);
 	if (hdr) {
 		kfree(hdr);
 		hdr = NULL;
@@ -215,7 +217,7 @@ int audmgr_open(struct audmgr *am)
 	if (IS_ERR(am->ept)) {
 		rc = PTR_ERR(am->ept);
 		am->ept = NULL;
-		pr_err("audmgr: failed to connect to audmgr svc\n");
+		pr_err("failed to connect to audmgr svc\n");
 		return rc;
 	}
 
@@ -248,7 +250,7 @@ int audmgr_enable(struct audmgr *am, struct audmgr_config *cfg)
 		return 0;
 
 	if (am->state == STATE_DISABLING)
-		pr_err("audmgr: state is DISABLING in enable?\n");
+		pr_err("state is DISABLING in enable?\n");
 	am->state = STATE_ENABLING;
 
 	msg.args.set_to_one = cpu_to_be32(1);
@@ -269,13 +271,14 @@ int audmgr_enable(struct audmgr *am, struct audmgr_config *cfg)
 
 	rc = wait_event_timeout(am->wait, am->state != STATE_ENABLING, 15 * HZ);
 	if (rc == 0) {
-		pr_err("audmgr_enable: ARM9 did not reply to RPC am->state = %d\n", am->state);
+		pr_err("%s(): ARM9 did not reply to RPC am->state = %d\n",
+		       __func__, am->state);
 		BUG();
 	}
 	if (am->state == STATE_ENABLED)
 		return 0;
 
-	pr_err("audmgr: unexpected state %d while enabling?!\n", am->state);
+	pr_err("unexpected state %d while enabling?!\n", am->state);
 	return -ENODEV;
 }
 EXPORT_SYMBOL(audmgr_enable);
@@ -300,14 +303,15 @@ int audmgr_disable(struct audmgr *am)
 
 	rc = wait_event_timeout(am->wait, am->state != STATE_DISABLING, 15 * HZ);
 	if (rc == 0) {
-		pr_err("audmgr_disable: ARM9 did not reply to RPC am->state = %d\n", am->state);
+		pr_err("%s(): ARM9 did not reply to RPC am->state = %d\n",
+		       __func__, am->state);
 		BUG();
 	}
 
 	if (am->state == STATE_DISABLED)
 		return 0;
 
-	pr_err("audmgr: unexpected state %d while disabling?!\n", am->state);
+	pr_err("unexpected state %d while disabling?!\n", am->state);
 	return -ENODEV;
 }
 EXPORT_SYMBOL(audmgr_disable);
diff --git a/drivers/staging/dream/qdsp5/audpp.c b/drivers/staging/dream/qdsp5/audpp.c
index d06556e..b4d99b3 100644
--- a/drivers/staging/dream/qdsp5/audpp.c
+++ b/drivers/staging/dream/qdsp5/audpp.c
@@ -16,6 +16,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/wait.h>
@@ -160,8 +162,8 @@ static void audpp_dsp_event(void *data, unsigned id, size_t len,
 	switch (id) {
 	case AUDPP_MSG_STATUS_MSG:{
 			unsigned cid = msg[0];
-			pr_info("audpp: status %d %d %d\n", cid, msg[1],
-				msg[2]);
+			pr_info("status %d %d %d\n",
+				cid, msg[1], msg[2]);
 			if ((cid < 5) && audpp->func[cid])
 				audpp->func[cid] (audpp->private[cid], id, msg);
 			break;
@@ -171,19 +173,19 @@ static void audpp_dsp_event(void *data, unsigned id, size_t len,
 			audpp->func[5] (audpp->private[5], id, msg);
 		break;
 	case AUDPP_MSG_PCMDMAMISSED:
-		pr_err("audpp: DMA missed obj=%x\n", msg[0]);
+		pr_err("DMA missed obj=%x\n", msg[0]);
 		break;
 	case AUDPP_MSG_CFG_MSG:
 		if (msg[0] == AUDPP_MSG_ENA_ENA) {
-			pr_info("audpp: ENABLE\n");
+			pr_info("ENABLE\n");
 			audpp->enabled = 1;
 			audpp_broadcast(audpp, id, msg);
 		} else if (msg[0] == AUDPP_MSG_ENA_DIS) {
-			pr_info("audpp: DISABLE\n");
+			pr_info("DISABLE\n");
 			audpp->enabled = 0;
 			audpp_broadcast(audpp, id, msg);
 		} else {
-			pr_err("audpp: invalid config msg %d\n", msg[0]);
+			pr_err("invalid config msg %d\n", msg[0]);
 		}
 		break;
 	case AUDPP_MSG_ROUTING_ACK:
@@ -193,7 +195,7 @@ static void audpp_dsp_event(void *data, unsigned id, size_t len,
 		audpp_notify_clnt(audpp, msg[0], id, msg);
 		break;
 	default:
-	  pr_info("audpp: unhandled msg id %x\n", id);
+	  pr_info("unhandled msg id %x\n", id);
 	}
 }
 
@@ -231,10 +233,10 @@ int audpp_enable(int id, audpp_event_func func, void *private)
 
 	LOG(EV_ENABLE, 1);
 	if (audpp->open_count++ == 0) {
-		pr_info("audpp: enable\n");
+		pr_info("enable\n");
 		res = msm_adsp_get("AUDPPTASK", &audpp->mod, &adsp_ops, audpp);
 		if (res < 0) {
-			pr_err("audpp: cannot open AUDPPTASK\n");
+			pr_err("cannot open AUDPPTASK\n");
 			audpp->open_count = 0;
 			audpp->func[id] = NULL;
 			audpp->private[id] = NULL;
@@ -284,7 +286,7 @@ void audpp_disable(int id, void *private)
 	local_irq_restore(flags);
 
 	if (--audpp->open_count == 0) {
-		pr_info("audpp: disable\n");
+		pr_info("disable\n");
 		LOG(EV_DISABLE, 2);
 		audpp_dsp_config(0);
 		msm_adsp_disable(audpp->mod);
-- 
1.6.5.rc3.dirty




More information about the devel mailing list