[PATCH 04/11] wcn36xx: Rework nv_data struct

Eugene Krasnikov k.eugene.e at gmail.com
Thu Aug 22 04:45:57 EDT 2013


table must be u8 size so that it's easier to iterate.

Signed-off-by: Eugene Krasnikov <k.eugene.e at gmail.com>
---
 smd.c     | 3 +--
 wcn36xx.h | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/smd.c b/smd.c
index 882bd25..d4e2ed3 100644
--- a/smd.c
+++ b/smd.c
@@ -254,9 +254,8 @@ int wcn36xx_smd_load_nv(struct wcn36xx *wcn)
 		memcpy(wcn->smd_buf, &msg_body,	sizeof(msg_body));
 
 		/* Add NV body itself */
-		/* Rework me */
 		memcpy(wcn->smd_buf + sizeof(msg_body),
-		       (void *)(&nv_d->table) + fm_offset,
+		       &nv_d->table + fm_offset,
 		       msg_body.nv_img_buffer_size);
 
 		ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len);
diff --git a/wcn36xx.h b/wcn36xx.h
index f1b58b4..61f579d 100644
--- a/wcn36xx.h
+++ b/wcn36xx.h
@@ -90,7 +90,7 @@ static inline void buff_to_be(u32 *buf, size_t len)
 
 struct nv_data {
 	int	is_valid;
-	void	*table;
+	u8	table;
 };
 
 /* Interface for platform control path
-- 
1.8.2.2




More information about the wcn36xx mailing list