Ignore:
Timestamp:
May 1, 2010, 9:49:10 PM (15 years ago)
Author:
David Azarewicz
Message:

Cleanup compiler warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/lib32/ioctl.c

    r470 r479  
    3838int pcm_instances(int card_id);
    3939
    40 int uniaud_set_interrupted_substream(struct snd_pcm_substream *substream)
     40void uniaud_set_interrupted_substream(struct snd_pcm_substream *substream)
    4141{
    4242    int i;
     
    257257    }
    258258    return max_ch;
    259 }
    260 
    261 void FillCaps(ULONG deviceid)
    262 {
    263     int pcms = 0;
    264 
    265     pcms = pcm_instances(deviceid);
    266 
    267     printk("pcms = %i\n", pcms); //uncommented
    268     if (!pcmcaps[deviceid])
    269     {
    270         pcmcaps[deviceid] = (POSS32_DEVCAPS)kmalloc(sizeof(OSS32_DEVCAPS)*pcms, GFP_KERNEL);
    271         if (pcmcaps[deviceid])
    272         {
    273             memset(pcmcaps[deviceid], 0, sizeof(OSS32_DEVCAPS)*pcms);
    274             GetUniaudPcmCaps1(deviceid, (void *)pcmcaps[deviceid]);
    275         }
    276     }
    277     return;
    278 }
    279 
    280 int GetUniaudPcmCaps(ULONG deviceid, void *caps)
    281 {
    282     int pcms = 0;
    283 
    284     pcms = pcm_instances(deviceid);
    285 
    286 //    printk("pcms = %i\n", pcms);
    287     if (pcmcaps[deviceid])
    288     {
    289         memcpy((unsigned char*)caps,(unsigned char*)pcmcaps[deviceid],sizeof(OSS32_DEVCAPS)*pcms);
    290         return 0;
    291     }
    292     else
    293     {
    294         return -1;
    295     }
    296259}
    297260
     
    316279    if (!pcaps || !pcms) return -1;
    317280
    318    
     281
    319282    //these structures are too big to put on the stack
    320283    pcminfo = (struct snd_pcm_info *)kmalloc(sizeof(struct snd_pcm_info)+sizeof(struct snd_pcm_hw_params), GFP_KERNEL);
     
    434397}
    435398
     399void FillCaps(ULONG deviceid)
     400{
     401    int pcms = 0;
     402
     403    pcms = pcm_instances(deviceid);
     404
     405    printk("pcms = %i\n", pcms); //uncommented
     406    if (!pcmcaps[deviceid])
     407    {
     408        pcmcaps[deviceid] = (POSS32_DEVCAPS)kmalloc(sizeof(OSS32_DEVCAPS)*pcms, GFP_KERNEL);
     409        if (pcmcaps[deviceid])
     410        {
     411            memset(pcmcaps[deviceid], 0, sizeof(OSS32_DEVCAPS)*pcms);
     412            GetUniaudPcmCaps1(deviceid, (void *)pcmcaps[deviceid]);
     413        }
     414    }
     415    return;
     416}
     417
     418int GetUniaudPcmCaps(ULONG deviceid, void *caps)
     419{
     420    int pcms = 0;
     421
     422    pcms = pcm_instances(deviceid);
     423
     424//    printk("pcms = %i\n", pcms);
     425    if (pcmcaps[deviceid])
     426    {
     427        memcpy((unsigned char*)caps,(unsigned char*)pcmcaps[deviceid],sizeof(OSS32_DEVCAPS)*pcms);
     428        return 0;
     429    }
     430    else
     431    {
     432        return -1;
     433    }
     434}
     435
    436436/*
    437437 returns power state of given card
     
    469469    }
    470470    //retrieve mixer information
    471     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    472                                     SNDRV_CTL_IOCTL_POWER_STATE, 
     471    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     472                                    SNDRV_CTL_IOCTL_POWER_STATE,
    473473                                    (ULONG)state);
    474474
     
    522522    }
    523523    //retrieve mixer information
    524     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    525                                     SNDRV_CTL_IOCTL_POWER, 
     524    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     525                                    SNDRV_CTL_IOCTL_POWER,
    526526                                    (ULONG)state);
    527527
     
    576576    }
    577577    //retrieve mixer information
    578     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    579                                     SNDRV_CTL_IOCTL_CARD_INFO, 
     578    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     579                                    SNDRV_CTL_IOCTL_CARD_INFO,
    580580                                    (ULONG)(struct snd_ctl_card_info *)info);
    581581    if(ret) {
     
    630630    }
    631631    //retrieve mixer information
    632     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    633                                     SNDRV_CTL_IOCTL_CARD_INFO, 
     632    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     633                                    SNDRV_CTL_IOCTL_CARD_INFO,
    634634                                    (ULONG)&pHandle->info);
    635635    if(ret) {
     
    640640    pHandle->list.offset = 0;
    641641    pHandle->list.space  = 0;
    642     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    643                                     SNDRV_CTL_IOCTL_ELEM_LIST, 
     642    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     643                                    SNDRV_CTL_IOCTL_ELEM_LIST,
    644644                                    (ULONG)&pHandle->list);
    645645    if(ret) {
     
    695695    }
    696696    //retrieve mixer information
    697     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    698                                     SNDRV_CTL_IOCTL_CARD_INFO, 
     697    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     698                                    SNDRV_CTL_IOCTL_CARD_INFO,
    699699                                    (ULONG)&pHandle->info);
    700700    if(ret) {
     
    705705    pHandle->list.offset = 0;
    706706    pHandle->list.space  = 0;
    707     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    708                                     SNDRV_CTL_IOCTL_ELEM_LIST, 
     707    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     708                                    SNDRV_CTL_IOCTL_ELEM_LIST,
    709709                                    (ULONG)&pHandle->list);
    710710    if(ret) {
     
    724724    pHandle->list.space  = pHandle->list.count;
    725725    pHandle->list.pids   = pHandle->pids;
    726     ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 
    727                                     SNDRV_CTL_IOCTL_ELEM_LIST, 
     726    ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     727                                    SNDRV_CTL_IOCTL_ELEM_LIST,
    728728                                    (ULONG)&pHandle->list);
    729729    if(ret) {
Note: See TracChangeset for help on using the changeset viewer.