fix cmmb compile error
authorroot <root@zyc-desktop.(none)>
Sun, 19 Sep 2010 08:07:07 +0000 (16:07 +0800)
committerroot <root@zyc-desktop.(none)>
Fri, 24 Sep 2010 09:19:12 +0000 (17:19 +0800)
drivers/cmmb/siano/smscoreapi.c
drivers/cmmb/siano/smscoreapi.h
drivers/cmmb/siano/smsspilog.c
drivers/cmmb/siano/smsspiphy_rk.c

index 2c49943972ca1cad2daf7e4e0a9847160848c69d..11251a538d03b57c4e51ee23c9fbeb98c93446a7 100755 (executable)
@@ -36,7 +36,7 @@
 #include "smscoreapi.h"
 #include "smsendian.h"
 #include "sms-cards.h"
-
+#include <mach/gpio.h>
 
 #define MAX_GPIO_PIN_NUMBER    31
 
index 0dde4271c5c469ced7592fa36215af9722990ab6..bcb9bcaf98810d0fa27be9b8d71ef93617e60a64 100755 (executable)
@@ -542,7 +542,7 @@ extern int sms_debug;
 #define sms_info(fmt, arg...) \
        dprintk(KERN_INFO, DBG_INFO, fmt, ##arg)
 #define sms_debug(fmt, arg...) \
-       dprintk(KERN_INFO, DBG_INFO, fmt, ##arg)//
+       dprintk(KERN_INFO, DBG_INFO, fmt, ##arg)
 
 //define the gpio used 
 #define CMMB_1186_SPIIRQ         RK2818_PIN_PA6  //This Pin is SDK Board GPIOPortA_Pin6 
index cdbbe3cf5990be63e9fac2da28c4ae7178496690..87a82c9af42dec6bd999e95a34485eb622de9ae7 100755 (executable)
@@ -106,8 +106,8 @@ static int spi_suspended   = 0 ;
 static void spi_worker_thread(void *arg);
 
 #if SIANO_HALFDUPLEX
-int g_IsTokenOwned=FALSE;
-int g_IsTokenEnable=FALSE;
+int g_IsTokenOwned=false;
+int g_IsTokenEnable=false;
 struct semaphore       HalfDuplexSemaphore;
 struct task_struct     *SPI_Thread;
 static int SPI_Thread_IsStop=0;
@@ -152,8 +152,8 @@ static void spi_worker_thread(void *arg)
 
 
 #if SIANO_HALFDUPLEX
-       static UINT8 s_SpiTokenMsgBuf[256] = {0};
-       const UINT8 g_PreambleBytes[4] = { 0xa5, 0x5a, 0xe7, 0x7e};
+       static u8 s_SpiTokenMsgBuf[256] = {0};
+       const u8 g_PreambleBytes[4] = { 0xa5, 0x5a, 0xe7, 0x7e};
        struct SmsMsgHdr_ST s_SpiTokenSendMsg = {MSG_SMS_SPI_HALFDUPLEX_TOKEN_HOST_TO_DEVICE, 0, 11, sizeof(struct SmsMsgHdr_ST), MSG_HDR_FLAG_STATIC_MSG};
 
        memcpy( s_SpiTokenMsgBuf, g_PreambleBytes, sizeof(g_PreambleBytes) );
@@ -171,7 +171,7 @@ static void spi_worker_thread(void *arg)
                                if (!msg) {
                                        // TX queue empty - give up token
                                        sms_debug("TX queue empty - give up token\n");
-                                       g_IsTokenOwned = FALSE;
+                                       g_IsTokenOwned = false;
                                        txmsg.len = 256;
                                        txmsg.buf = s_SpiTokenMsgBuf;
                                        txmsg.buf_phy_addr = 0;//zzf spi_device->txbuf_phy_addr;
@@ -728,7 +728,7 @@ static int siano1186_probe( struct spi_device *Smsdevice)
     }
 
 #if SIANO_HALFDUPLEX
-       g_IsTokenOwned = FALSE;
+       g_IsTokenOwned = false;
        init_MUTEX_LOCKED(&HalfDuplexSemaphore);
        SPI_Thread = kthread_run(spi_worker_thread,NULL,"cmmb_spi_thread");
        SPI_Thread_IsStop = 0;
@@ -782,7 +782,7 @@ void smsspi_remove(void)
 {
        struct _spi_device_st *spi_device = spi_dev;
        sms_info(KERN_INFO "smsmdtv: in smsspi_unregister\n") ;
-
+        int ret;
 #if SIANO_HALFDUPLEX
        SPI_Thread_IsStop = 1;
   up(&HalfDuplexSemaphore);
index cb1c41c5507d3fc23f0560f7bdbc0a1c5439e5ab..0ded499d5c1a4e1ffc6d78c67a3c0cccdc7113b9 100755 (executable)
@@ -180,11 +180,13 @@ static unsigned long dma_map_buf(struct spiphy_dev_s *spiphy_dev, char *buf,
                return 0;
        }
        /* map buffer */
+/*
        phyaddr = dma_map_single(spiphy_dev->dev, buf, len, direction);
        if (dma_mapping_error(phyaddr)) {
                PERROR("exiting  with error\n");
                return 0;
        }
+*/
        return phyaddr;
 }