Ignore:
Timestamp:
Jan 16, 2021, 10:20:04 PM (5 years ago)
Author:
Paul Smedley
Message:

More code cleanups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-next/lib32/ioctl.c

    r625 r644  
    317317
    318318                        dprintf(("GetUniaudPcmCaps: cp1. pcm %i, phandle %x", i, pHandle));
    319                         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_INFO, (ULONG)pcminfo);
     319                        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_INFO, (ULONG)pcminfo);
    320320                        if(ret != 0) {
    321321                                rprintf(("GetUniaudPcmCaps: SNDRV_PCM_IOCTL_INFO error %i", ret));
     
    337337                        //get all hardware parameters
    338338                        _snd_pcm_hw_params_any(params);
    339                         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)params);
     339                        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)params);
    340340                        if(ret != 0) {
    341341                                dprintf(("GetUniaudPcmCaps: SNDRV_PCM_IOCTL_HW_REFINE error %i", ret));
     
    468468        }
    469469        //retrieve mixer information
    470         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     470        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file,
    471471                                                                        SNDRV_CTL_IOCTL_POWER_STATE,
    472472                                                                        (ULONG)state);
     
    522522        }
    523523        //retrieve mixer information
    524         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     524        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file,
    525525                                                                        SNDRV_CTL_IOCTL_POWER,
    526526                                                                        (ULONG)state);
     
    578578        }
    579579        //retrieve mixer information
    580         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     580        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file,
    581581                                                                        SNDRV_CTL_IOCTL_CARD_INFO,
    582582                                                                        (ULONG)(struct snd_ctl_card_info *)info);
     
    635635        }
    636636        //retrieve mixer information
    637         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     637        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file,
    638638                                                                        SNDRV_CTL_IOCTL_CARD_INFO,
    639639                                                                        (ULONG)&pHandle->info);
     
    645645        pHandle->list.offset = 0;
    646646        pHandle->list.space  = 0;
    647         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     647        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file,
    648648                                                                        SNDRV_CTL_IOCTL_ELEM_LIST,
    649649                                                                        (ULONG)&pHandle->list);
     
    703703        }
    704704        //retrieve mixer information
    705         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     705        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file,
    706706                                                                        SNDRV_CTL_IOCTL_CARD_INFO,
    707707                                                                        (ULONG)&pHandle->info);
     
    713713        pHandle->list.offset = 0;
    714714        pHandle->list.space  = 0;
    715         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     715        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file,
    716716                                                                        SNDRV_CTL_IOCTL_ELEM_LIST,
    717717                                                                        (ULONG)&pHandle->list);
     
    732732        pHandle->list.space  = pHandle->list.count;
    733733        pHandle->list.pids       = pHandle->pids;
    734         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file,
     734        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file,
    735735                                                                        SNDRV_CTL_IOCTL_ELEM_LIST,
    736736                                                                        (ULONG)&pHandle->list);
     
    806806
    807807        pElemInfo->id.numid = id;
    808         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_CTL_IOCTL_ELEM_INFO, (ULONG)pElemInfo);
     808        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_CTL_IOCTL_ELEM_INFO, (ULONG)pElemInfo);
    809809        ret = pHandle->file.f_op->release(&pHandle->inode, &pHandle->file);
    810810        if(pHandle) kfree(pHandle);
     
    864864        pElem->id.numid = id;
    865865        pElem->indirect = 0;
    866         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_CTL_IOCTL_ELEM_READ, (ULONG)pElem);
     866        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_CTL_IOCTL_ELEM_READ, (ULONG)pElem);
    867867        ret = pHandle->file.f_op->release(&pHandle->inode, &pHandle->file);
    868868        if(pHandle) kfree(pHandle);
     
    924924        pElem->indirect = 0;
    925925
    926         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_CTL_IOCTL_ELEM_WRITE, (ULONG)pElem);
     926        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_CTL_IOCTL_ELEM_WRITE, (ULONG)pElem);
    927927        ret = pHandle->file.f_op->release(&pHandle->inode, &pHandle->file);
    928928        if(pHandle) kfree(pHandle);
     
    952952
    953953        pHandle->file.f_flags = O_NONBLOCK;
    954         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)params);
     954        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)params);
    955955        return ret;
    956956}
     
    969969
    970970        pHandle->file.f_flags = O_NONBLOCK;
    971         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_HW_PARAMS, (ULONG)params);
     971        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_HW_PARAMS, (ULONG)params);
    972972        return ret;
    973973}
     
    988988        pHandle->file.f_flags = O_NONBLOCK;
    989989
    990         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_SW_PARAMS, (ULONG)params);
     990        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_SW_PARAMS, (ULONG)params);
    991991        return ret;
    992992}
     
    10051005        pHandle->file.f_flags = O_NONBLOCK;
    10061006
    1007         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG)status);
     1007        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG)status);
    10081008        return ret;
    10091009}
     
    10541054        pHandle->file.f_flags = O_NONBLOCK;
    10551055
    1056         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_PREPARE, 0);
     1056        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_PREPARE, 0);
    10571057        return ret;
    10581058}
     
    10691069        pHandle->file.f_flags = O_NONBLOCK;
    10701070
    1071         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_PAUSE, pause);
     1071        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_PAUSE, pause);
    10721072
    10731073        return ret;
     
    10851085        pHandle->file.f_flags = O_NONBLOCK;
    10861086
    1087         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_START, 0);
     1087        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_START, 0);
    10881088
    10891089        return ret;
     
    11011101        pHandle->file.f_flags = O_NONBLOCK;
    11021102
    1103         ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_DROP, 0);
     1103        ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_DROP, 0);
    11041104
    11051105        return ret;
Note: See TracChangeset for help on using the changeset viewer.