[PATCH 080/111] LEON: B1553RT driver warnings fixes
Daniel Hellstrom
daniel at gaisler.com
Thu Feb 26 16:39:22 UTC 2015
---
c/src/lib/libbsp/sparc/shared/1553/b1553rt.c | 5 +----
c/src/lib/libbsp/sparc/shared/include/b1553rt.h | 5 +++++
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/c/src/lib/libbsp/sparc/shared/1553/b1553rt.c b/c/src/lib/libbsp/sparc/shared/1553/b1553rt.c
index 3dfb403..57bc4d3 100644
--- a/c/src/lib/libbsp/sparc/shared/1553/b1553rt.c
+++ b/c/src/lib/libbsp/sparc/shared/1553/b1553rt.c
@@ -318,7 +318,7 @@ int b1553rt_device_init(rt_priv *pDev)
/* Use dynamically allocated memory,
* 4k DMA memory + 4k for alignment
*/
- mem = (char *)malloc(4 * 1024 * 2);
+ mem = (unsigned int)malloc(4 * 1024 * 2);
if ( !mem ){
printk("RT: Failed to allocate HW memory\n\r");
return -1;
@@ -835,9 +835,6 @@ static void b1553rt_interrupt(void *arg)
void b1553rt_print_dev(struct drvmgr_dev *dev, int options)
{
rt_priv *pDev = dev->priv;
- struct amba_dev_info *devinfo;
-
- devinfo = (struct amba_dev_info *)pDev->dev->businfo;
/* Print */
printf("--- B1553RT[%d] %s ---\n", pDev->minor, pDev->devName);
diff --git a/c/src/lib/libbsp/sparc/shared/include/b1553rt.h b/c/src/lib/libbsp/sparc/shared/include/b1553rt.h
index 94b5afd..94b03f1 100644
--- a/c/src/lib/libbsp/sparc/shared/include/b1553rt.h
+++ b/c/src/lib/libbsp/sparc/shared/include/b1553rt.h
@@ -11,6 +11,8 @@
#ifndef __B1553RT_H__
#define __B1553RT_H__
+#include <drvmgr/drvmgr.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -64,6 +66,9 @@ struct rt_msg {
#define RT_TSW_PAR (1<<6)
#define RT_TSW_WC (1<<5)
+void b1553rt_print_dev(struct drvmgr_dev *dev, int options);
+void b1553rt_print(int options);
+
void b1553rt_register_drv(void);
#ifdef __cplusplus
--
1.7.0.4
More information about the devel
mailing list