VirtualBox

Changeset 81591 in vbox for trunk/src/VBox/Devices/Serial


Ignore:
Timestamp:
Oct 30, 2019 2:14:10 PM (5 years ago)
Author:
vboxsync
Message:

Devices: Use PDMDEVINS_2_DATA and PDMDEVINS_2_DATA. bugref:9218

Location:
trunk/src/VBox/Devices/Serial
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Serial/DevOxPcie958.cpp

    r81514 r81591  
    216216{
    217217    RT_NOREF(pUart);
    218     PDEVOX958 pThis = PDMINS_2_DATA(pDevIns, PDEVOX958);
     218    PDEVOX958 pThis = PDMDEVINS_2_DATA(pDevIns, PDEVOX958);
    219219
    220220    if (iLvl)
     
    238238PDMBOTHCBDECL(int) ox958MmioRead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void *pv, unsigned cb)
    239239{
    240     PDEVOX958 pThis = PDMINS_2_DATA(pDevIns, PDEVOX958);
     240    PDEVOX958 pThis = PDMDEVINS_2_DATA(pDevIns, PDEVOX958);
    241241    uint32_t  offReg = (GCPhysAddr - pThis->GCPhysMMIO);
    242242    int       rc = VINF_SUCCESS;
     
    308308PDMBOTHCBDECL(int) ox958MmioWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void const *pv, unsigned cb)
    309309{
    310     PDEVOX958 pThis = PDMINS_2_DATA(pDevIns, PDEVOX958);
     310    PDEVOX958 pThis = PDMDEVINS_2_DATA(pDevIns, PDEVOX958);
    311311    uint32_t  offReg = (GCPhysAddr - pThis->GCPhysMMIO);
    312312    int       rc = VINF_SUCCESS;
     
    367367                                    RTGCPHYS GCPhysAddress, RTGCPHYS cb, PCIADDRESSSPACE enmType)
    368368{
    369     PDEVOX958 pThis = PDMINS_2_DATA(pDevIns, PDEVOX958);
     369    PDEVOX958 pThis = PDMDEVINS_2_DATA(pDevIns, PDEVOX958);
    370370    int       rc    = VINF_SUCCESS;
    371371    RT_NOREF(pPciDev, enmType);
     
    409409static DECLCALLBACK(void) ox958R3Detach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags)
    410410{
    411     PDEVOX958 pThis = PDMINS_2_DATA(pDevIns, PDEVOX958);
     411    PDEVOX958 pThis = PDMDEVINS_2_DATA(pDevIns, PDEVOX958);
    412412    AssertReturnVoid(iLUN >= pThis->cUarts);
    413413
     
    421421static DECLCALLBACK(int) ox958R3Attach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags)
    422422{
    423     PDEVOX958 pThis = PDMINS_2_DATA(pDevIns, PDEVOX958);
     423    PDEVOX958 pThis = PDMDEVINS_2_DATA(pDevIns, PDEVOX958);
    424424
    425425    RT_NOREF(fFlags);
     
    435435static DECLCALLBACK(void) ox958R3Reset(PPDMDEVINS pDevIns)
    436436{
    437     PDEVOX958 pThis = PDMINS_2_DATA(pDevIns, PDEVOX958);
     437    PDEVOX958 pThis = PDMDEVINS_2_DATA(pDevIns, PDEVOX958);
    438438
    439439    pThis->u32RegIrqStsGlob = 0x00;
     
    449449static DECLCALLBACK(void) ox958R3Relocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
    450450{
    451     PDEVOX958 pThis = PDMINS_2_DATA(pDevIns, PDEVOX958);
     451    PDEVOX958 pThis = PDMDEVINS_2_DATA(pDevIns, PDEVOX958);
    452452    RT_NOREF(offDelta);
    453453
     
    461461static DECLCALLBACK(int) ox958R3Destruct(PPDMDEVINS pDevIns)
    462462{
    463     PDEVOX958 pThis = PDMINS_2_DATA(pDevIns, PDEVOX958);
     463    PDEVOX958 pThis = PDMDEVINS_2_DATA(pDevIns, PDEVOX958);
    464464    PDMDEV_CHECK_VERSIONS_RETURN_QUIET(pDevIns);
    465465
     
    475475{
    476476    RT_NOREF(iInstance);
    477     PDEVOX958   pThis = PDMINS_2_DATA(pDevIns, PDEVOX958);
     477    PDEVOX958   pThis = PDMDEVINS_2_DATA(pDevIns, PDEVOX958);
    478478    bool        fRCEnabled = true;
    479479    bool        fR0Enabled = true;
  • trunk/src/VBox/Devices/Serial/DevSerial.cpp

    r81514 r81591  
    7676{
    7777    RT_NOREF(pUart, iLUN);
    78     PDEVSERIAL pThis = PDMINS_2_DATA(pDevIns, PDEVSERIAL);
     78    PDEVSERIAL pThis = PDMDEVINS_2_DATA(pDevIns, PDEVSERIAL);
    7979    PDMDevHlpISASetIrqNoWait(pDevIns, pThis->uIrq, iLvl);
    8080}
     
    8888PDMBOTHCBDECL(int) serialIoPortWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT uPort, uint32_t u32, unsigned cb)
    8989{
    90     PDEVSERIAL pThis = PDMINS_2_DATA(pDevIns, PDEVSERIAL);
     90    PDEVSERIAL pThis = PDMDEVINS_2_DATA(pDevIns, PDEVSERIAL);
    9191    RT_NOREF_PV(pvUser);
    9292
     
    100100PDMBOTHCBDECL(int) serialIoPortRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT uPort, uint32_t *pu32, unsigned cb)
    101101{
    102     PDEVSERIAL pThis = PDMINS_2_DATA(pDevIns, PDEVSERIAL);
     102    PDEVSERIAL pThis = PDMDEVINS_2_DATA(pDevIns, PDEVSERIAL);
    103103    RT_NOREF_PV(pvUser);
    104104
     
    138138{
    139139    RT_NOREF(uPass);
    140     PDEVSERIAL pThis = PDMINS_2_DATA(pDevIns, PDEVSERIAL);
     140    PDEVSERIAL pThis = PDMDEVINS_2_DATA(pDevIns, PDEVSERIAL);
    141141    SSMR3PutU8(pSSM, pThis->uIrq);
    142142    SSMR3PutIOPort(pSSM, pThis->PortBase);
     
    152152static DECLCALLBACK(int) serialR3SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
    153153{
    154     PDEVSERIAL pThis = PDMINS_2_DATA(pDevIns, PDEVSERIAL);
     154    PDEVSERIAL pThis = PDMDEVINS_2_DATA(pDevIns, PDEVSERIAL);
    155155
    156156    SSMR3PutU8(    pSSM, pThis->uIrq);
     
    168168static DECLCALLBACK(int) serialR3LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass)
    169169{
    170     PDEVSERIAL pThis = PDMINS_2_DATA(pDevIns, PDEVSERIAL);
     170    PDEVSERIAL pThis = PDMDEVINS_2_DATA(pDevIns, PDEVSERIAL);
    171171    uint8_t    bIrq;
    172172    RTIOPORT   PortBase;
     
    236236static DECLCALLBACK(int) serialR3LoadDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
    237237{
    238     PDEVSERIAL  pThis = PDMINS_2_DATA(pDevIns, PDEVSERIAL);
     238    PDEVSERIAL  pThis = PDMDEVINS_2_DATA(pDevIns, PDEVSERIAL);
    239239    return uartR3LoadDone(&pThis->UartCore, pSSM);
    240240}
     
    248248static DECLCALLBACK(void) serialR3Relocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)
    249249{
    250     PDEVSERIAL pThis = PDMINS_2_DATA(pDevIns, PDEVSERIAL);
     250    PDEVSERIAL pThis = PDMDEVINS_2_DATA(pDevIns, PDEVSERIAL);
    251251    uartR3Relocate(&pThis->UartCore, offDelta);
    252252}
     
    258258static DECLCALLBACK(void) serialR3Reset(PPDMDEVINS pDevIns)
    259259{
    260     PDEVSERIAL pThis = PDMINS_2_DATA(pDevIns, PDEVSERIAL);
     260    PDEVSERIAL pThis = PDMDEVINS_2_DATA(pDevIns, PDEVSERIAL);
    261261    uartR3Reset(&pThis->UartCore);
    262262}
     
    269269{
    270270    RT_NOREF(fFlags);
    271     PDEVSERIAL pThis = PDMINS_2_DATA(pDevIns, PDEVSERIAL);
     271    PDEVSERIAL pThis = PDMDEVINS_2_DATA(pDevIns, PDEVSERIAL);
    272272    return uartR3Attach(&pThis->UartCore, iLUN);
    273273}
     
    280280{
    281281    RT_NOREF(iLUN, fFlags);
    282     PDEVSERIAL pThis = PDMINS_2_DATA(pDevIns, PDEVSERIAL);
     282    PDEVSERIAL pThis = PDMDEVINS_2_DATA(pDevIns, PDEVSERIAL);
    283283    uartR3Detach(&pThis->UartCore);
    284284}
     
    290290static DECLCALLBACK(int) serialR3Destruct(PPDMDEVINS pDevIns)
    291291{
    292     PDEVSERIAL pThis = PDMINS_2_DATA(pDevIns, PDEVSERIAL);
     292    PDEVSERIAL pThis = PDMDEVINS_2_DATA(pDevIns, PDEVSERIAL);
    293293    PDMDEV_CHECK_VERSIONS_RETURN_QUIET(pDevIns);
    294294
     
    303303static DECLCALLBACK(int) serialR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg)
    304304{
    305     PDEVSERIAL pThis = PDMINS_2_DATA(pDevIns, PDEVSERIAL);
     305    PDEVSERIAL pThis = PDMDEVINS_2_DATA(pDevIns, PDEVSERIAL);
    306306    int        rc = VINF_SUCCESS;
    307307
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette