diff mbox

[4/5] staging:ti dspbridge: remove unnecessary volatile variables

Message ID 4C5046D5.6010306@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Nishanth Menon July 28, 2010, 3:03 p.m. UTC
None
diff mbox

Patch

--- a/drivers/staging/tidspbridge/pmgr/cmm.c
+++ b/drivers/staging/tidspbridge/pmgr/cmm.c
@@ -1022,18 +1022,17 @@  void *cmm_xlator_alloc_buf(struct 
cmm_xlatorobject *xlator, void *va_buf,
  	DBC_REQUIRE(xlator_obj->ul_seg_id > 0);

  	if (xlator_obj) {
+		void *t_buf = 0;
  		attrs.ul_seg_id = xlator_obj->ul_seg_id;
-		*(volatile u32 *)va_buf = 0;
  		/* Alloc SM */
  		pbuf =
  		    cmm_calloc_buf(xlator_obj->hcmm_mgr, pa_size, &attrs, NULL);
  		if (pbuf) {
  			/* convert to translator(node/strm) process Virtual
  			 * address */
-			*(volatile u32 **)va_buf =
-			    (u32 *) cmm_xlator_translate(xlator,
-							 pbuf, CMM_PA2VA);
+			t_buf = cmm_xlator_translate(xlator, pbuf, CMM_PA2VA);
  		}
+		writel(t_buf, va_buf);
  	}
  	return pbuf;