]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
apf: Replace xlnk_handle_t type with u32
authorS Mohan <s.mohan@xilinx.com>
Fri, 6 Sep 2013 00:00:00 +0000 (17:00 -0700)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 11 Sep 2013 05:28:33 +0000 (07:28 +0200)
Replace the xlnk_handle_t type with u32

Signed-off-by: S Mohan <s.mohan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/staging/apf/xlnk.c
drivers/staging/apf/xlnk.h

index 9ba109347ae0beff319a8e04d23d9baabdffb714..7b06d9fbf3d44ef1e04e24b38f56c2de46996439 100644 (file)
@@ -458,7 +458,7 @@ static int xlnk_release(struct inode *ip, struct file *filp)
 static int xlnk_devregister(char *name, unsigned int id,
                                unsigned long base, unsigned int size,
                                unsigned int *irqs,
-                               xlnk_handle_t *handle)
+                               u32 *handle)
 {
        unsigned int nres;
        unsigned int nirq;
@@ -469,7 +469,7 @@ static int xlnk_devregister(char *name, unsigned int id,
 
        devpack = xlnk_devpacks_find(base);
        if (devpack) {
-               *handle = (xlnk_handle_t)devpack;
+               *handle = (u32)devpack;
                return 0;
        }
        nirq = 0;
@@ -514,7 +514,7 @@ static int xlnk_devregister(char *name, unsigned int id,
                *handle = 0;
        } else {
                xlnk_devpacks_add(devpack);
-               *handle = (xlnk_handle_t)devpack;
+               *handle = (u32)devpack;
        }
        return status;
 }
@@ -532,7 +532,7 @@ static int xlnk_dmaregister(char *name, unsigned int id,
                                unsigned int chan1_poll_mode,
                                unsigned int chan1_include_dre,
                                unsigned int chan1_data_width,
-                               xlnk_handle_t *handle)
+                               u32 *handle)
 {
        int status = -1;
 
@@ -548,7 +548,7 @@ static int xlnk_dmaregister(char *name, unsigned int id,
 
        devpack = xlnk_devpacks_find(base);
        if (devpack) {
-               *handle = (xlnk_handle_t)devpack;
+               *handle = (u32)devpack;
                return 0;
        }
 
@@ -604,7 +604,7 @@ static int xlnk_dmaregister(char *name, unsigned int id,
                *handle = 0;
        } else {
                xlnk_devpacks_add(devpack);
-               *handle = (xlnk_handle_t)devpack;
+               *handle = (u32)devpack;
        }
 
 #endif
@@ -617,7 +617,7 @@ static int xlnk_mcdmaregister(char *name, unsigned int id,
                              unsigned int mm2s_chan_irq,
                              unsigned int s2mm_chan_num,
                              unsigned int s2mm_chan_irq,
-                             xlnk_handle_t *handle)
+                             u32 *handle)
 {
        int status = -1;
 
@@ -630,7 +630,7 @@ static int xlnk_mcdmaregister(char *name, unsigned int id,
 
        devpack = xlnk_devpacks_find(base);
        if (devpack) {
-               *handle = (xlnk_handle_t)devpack;
+               *handle = (u32)devpack;
                return 0;
        }
 
@@ -670,7 +670,7 @@ static int xlnk_mcdmaregister(char *name, unsigned int id,
                *handle = 0;
        } else {
                xlnk_devpacks_add(devpack);
-               *handle = (xlnk_handle_t)devpack;
+               *handle = (u32)devpack;
        }
 
 #endif
@@ -774,7 +774,7 @@ static int xlnk_dmarequest_ioctl(struct file *filp, unsigned int code,
                return -ENOMEM;
        }
 
-       temp_args.dmarequest.dmachan = (xlnk_handle_t)chan;
+       temp_args.dmarequest.dmachan = (u32)chan;
        temp_args.dmarequest.bd_space_phys_addr = chan->bd_phys_addr;
        temp_args.dmarequest.bd_space_size = chan->bd_chain_size;
 
@@ -818,10 +818,11 @@ static int xlnk_dmasubmit_ioctl(struct file *filp, unsigned int code,
                                                &dmahead);
 
        if (!status) {
-               temp_args.dmasubmit.dmahandle = (xlnk_handle_t)dmahead;
+               temp_args.dmasubmit.dmahandle = (u32)dmahead;
                temp_args.dmasubmit.last_bd_index =
-                                       (xlnk_handle_t)dmahead->last_bd_index;
+                                       (u32)dmahead->last_bd_index;
                copy_to_user((void *)args, &temp_args, sizeof(xlnk_args));
+
                return 0;
        }
 #endif
@@ -886,7 +887,7 @@ static int xlnk_devregister_ioctl(struct file *filp, unsigned int code,
 {
        xlnk_args temp_args;
        int status;
-       xlnk_handle_t handle;
+       u32 handle;
 
        status = copy_from_user(&temp_args, (xlnk_args *)args,
                                sizeof(xlnk_args));
@@ -909,7 +910,7 @@ static int xlnk_dmaregister_ioctl(struct file *filp, unsigned int code,
 {
        xlnk_args temp_args;
        int status;
-       xlnk_handle_t handle;
+       u32 handle;
 
        status = copy_from_user(&temp_args, (xlnk_args *)args,
                                sizeof(xlnk_args));
@@ -942,7 +943,7 @@ static int xlnk_mcdmaregister_ioctl(struct file *filp, unsigned int code,
 {
        xlnk_args temp_args;
        int status;
-       xlnk_handle_t handle;
+       u32 handle;
 
        status = copy_from_user(&temp_args, (xlnk_args *)args,
                                sizeof(xlnk_args));
index 2cb19e814d8d8dc1c54d025e5ecc0e3c82033b8f..fd40bba8455b80816d31a84690433798b52a3387 100644 (file)
@@ -15,7 +15,6 @@
 
 extern void xlnk_record_event(u32 event_id);
 
-typedef unsigned long xlnk_handle_t;
 
 enum xlnk_dma_direction {
        XLNK_DMA_BI = 0,
@@ -37,37 +36,37 @@ typedef union {
        } freebuf;
        struct {
                char name[64]; /* max length of 64 */
-               xlnk_handle_t dmachan; /* return value */
                unsigned int bd_space_phys_addr;/*for bd chain used by dmachan*/
                unsigned int bd_space_size; /* bd chain size in bytes */
+               u32 dmachan; /* return value */
        } dmarequest;
 #define XLNK_MAX_APPWORDS 5
        struct {
-               xlnk_handle_t dmachan;
+               u32 dmachan;
                void *buf;      /* buffer base address */
                void *buf2;     /* used to point src_buf in cdma case */
                unsigned int buf_offset; /* used on kernel allocated buffers */
                unsigned int len;
                unsigned int bufflag; /* zero all the time so far */
-               xlnk_handle_t sglist; /* ignored */
                unsigned int sgcnt; /* ignored */
+               u32 sglist; /* ignored */
                enum xlnk_dma_direction dmadir;
                unsigned int nappwords_i; /* n appwords passed to BD */
                unsigned int appwords_i[XLNK_MAX_APPWORDS];
                unsigned int nappwords_o; /* n appwords passed from BD */
                /* appwords array we only accept 5 max */
                unsigned int flag;
-               xlnk_handle_t dmahandle; /* return value */
                unsigned int last_bd_index; /*index of last bd used by request*/
+               u32 dmahandle; /* return value */
        } dmasubmit;
        struct {
-               xlnk_handle_t dmahandle;
                unsigned int nappwords; /* n appwords read from BD */
                unsigned int appwords[XLNK_MAX_APPWORDS];
+               u32 dmahandle;
                /* appwords array we only accept 5 max */
        } dmawait;
        struct {
-               xlnk_handle_t dmachan;
+               u32 dmachan;
        } dmarelease;
        struct {
                unsigned long base;