MLK-17289-1: hdp: change struct mem variable type to pointer
authorSandor Yu <Sandor.yu@nxp.com>
Fri, 22 Dec 2017 10:04:58 +0000 (18:04 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
Change struct mem variable type to pointer in struct state.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
drivers/mxc/hdp/util.c
drivers/mxc/hdp/util.h

index 9b2fdd8..a0c9771 100644 (file)
 
 int cdn_apb_read(state_struct *state, u32 addr, u32 *value)
 {
-       struct hdp_mem *mem = &state->mem;
+       struct hdp_mem *mem = state->mem;
        state->rw->read_reg(mem, addr, value);
        return 0;
 }
 
 int cdn_apb_write(state_struct *state, u32 addr, u32 value)
 {
-       struct hdp_mem *mem = &state->mem;
+       struct hdp_mem *mem = state->mem;
        state->rw->write_reg(mem, addr, value);
        return 0;
 }
 
 int cdn_sapb_read(state_struct *state, u32 addr, u32 *value)
 {
-       struct hdp_mem *mem = &state->mem;
+       struct hdp_mem *mem = state->mem;
        state->rw->sread_reg(mem, addr, value);
        return 0;
 }
 
 int cdn_sapb_write(state_struct *state, u32 addr, u32 value)
 {
-       struct hdp_mem *mem = &state->mem;
+       struct hdp_mem *mem = state->mem;
        state->rw->swrite_reg(mem, addr, value);
        return 0;
 }
index 6907fe6..c7329b2 100644 (file)
@@ -132,8 +132,8 @@ typedef struct {
 } INTERNAL_MBOX_STATUS;
 
 struct hdp_mem {
-       void __iomem *regs_base;
-       void __iomem *ss_base;
+       void __iomem *regs_base; /* Controller regs base */
+       void __iomem *ss_base; /* HDP Subsystem regs base */
 };
 
 struct hdp_rw_func {
@@ -155,7 +155,7 @@ typedef struct {
        u32 tmp;
 
        struct mutex mutex;     //mutex may replace running
-       struct hdp_mem mem;
+       struct hdp_mem *mem;
        struct hdp_rw_func *rw;
 } state_struct;
 /**