Changeset 2691

Show
Ignore:
Timestamp:
05/09/17 05:55:47 (7 months ago)
Author:
jwoithe
Message:

Initial attempt to address deprecation of auto_ptr.

C++11 deprecates auto_ptr, and gcc6 (and later versions) print compile time
warnings to this effect whenever it is encountered in the source. The
replacement type is either shared_ptr or unique_ptr depending on the usage.
For almost all usages within FFADO it seems unique_ptr could be the
appropriate choice, but the symantics are a little different to auto_ptr.
Shared_ptr on the other hand can be a drop-in replacement, although it comes
with considerable overheads which unique_ptr avoids. In the context of the
current usage, the extra overhead incurred is not critical.

The code-base cannot at this time change unconditionally to shared_ptr and
unique_ptr because these are not available in gcc4 unless "--std=c++11" is
given. When gcc4 is used certain older versions of dependent libraries must
be used and these in turn will cause compile failures in their header files
if "--std=c++11" is used (libxml++ being an example). At present there are
sufficient users of FFADO still on gcc4 to justify maintaining compatibility
with that gcc version.

The approach adopted at present is to define ffado_smartptr to be either
auto_ptr (if c++11 is not in use) or shared_ptr if it is. All auto_ptr
instances are then changed to ffado_smartptr. This should allow FFADO to be
compiled without errors or warnings on systems using gcc4 and above. Gcc6
defaults to the c++14 standard, so ffado_smartptr will be shared_ptr in that
case; thus the warnings will be avoided.

In time, once gcc4 drops out of common use, the ffado_smartptr instances can
be progressively migrated to unique_ptr or shared_ptr as is appropriate. It
has been pointed out in the ffado-devel mailing list by Jano Svitok (2 May
2017, subject "smart pointers Was: [FFADO-devel] Liquid Saffire 56") that
bebob_dl_mgr.cpp could use unique_ptr. shared_ptr should be ok in other
auto_ptr sites, but futher analysis may show that at least some of them can
use unique_ptr.

The addressing of the auto_ptr issue was prompted by Xavier Forestier's
patch set submitted to ffado-devel in November 2016.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/bebob/bebob_avdevice.cpp

    r2671 r2691  
    6565namespace BeBoB { 
    6666 
    67 Device::Device( DeviceManager& d, std::auto_ptr< ConfigRom >( configRom ) ) 
     67Device::Device( DeviceManager& d, ffado_smartptr< ConfigRom >( configRom ) ) 
    6868    : GenericAVC::Device( d, configRom ) 
    6969    , m_last_discovery_config_id ( 0xFFFFFFFFFFFFFFFFLLU ) 
     
    131131 
    132132FFADODevice * 
    133 Device::createDevice(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     133Device::createDevice(DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    134134{ 
    135135    unsigned int vendorId = configRom->getNodeVendorId(); 
  • trunk/libffado/src/bebob/bebob_avdevice.h

    r2443 r2691  
    6161class Device : public GenericAVC::Device { 
    6262public: 
    63     Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     63    Device( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    6464    virtual ~Device(); 
    6565 
     
    6969    virtual bool discover(); 
    7070 
    71     static FFADODevice * createDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     71    static FFADODevice * createDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    7272 
    7373    virtual AVC::Subunit* createSubunit(AVC::Unit& unit, 
  • trunk/libffado/src/bebob/bebob_dl_mgr.cpp

    r2587 r2691  
    242242 
    243243    printf( "parse BCD file\n" ); 
    244     std::auto_ptr<BCD> bcd = std::auto_ptr<BCD>( new BCD( filename ) ); 
     244    ffado_smartptr<BCD> bcd = ffado_smartptr<BCD>( new BCD( filename ) ); 
    245245    if ( !bcd.get() ) { 
    246246        debugError( "downloadFirmware: Could not open or parse BCD '%s'\n", 
     
    305305 
    306306    printf( "parse BCD file\n" ); 
    307     std::auto_ptr<BCD> bcd = std::auto_ptr<BCD>( new BCD( filename ) ); 
     307    ffado_smartptr<BCD> bcd = ffado_smartptr<BCD>( new BCD( filename ) ); 
    308308    if ( !bcd.get() ) { 
    309309        debugError( "downloadCnE: Could not open or parse BCD '%s'\n", 
  • trunk/libffado/src/bebob/edirol/edirol_fa101.cpp

    r1543 r2691  
    2828 
    2929EdirolFa101Device::EdirolFa101Device( DeviceManager& d, 
    30                                       std::auto_ptr<ConfigRom>( configRom )) 
     30                                      ffado_smartptr<ConfigRom>( configRom )) 
    3131    : BeBoB::Device( d , configRom) 
    3232{ 
  • trunk/libffado/src/bebob/edirol/edirol_fa101.h

    r1543 r2691  
    3333public: 
    3434    EdirolFa101Device( DeviceManager& d, 
    35                        std::auto_ptr<ConfigRom>( configRom )); 
     35                       ffado_smartptr<ConfigRom>( configRom )); 
    3636    virtual ~EdirolFa101Device(); 
    3737 
  • trunk/libffado/src/bebob/edirol/edirol_fa66.cpp

    r1543 r2691  
    2828 
    2929EdirolFa66Device::EdirolFa66Device( DeviceManager& d, 
    30                                       std::auto_ptr<ConfigRom>( configRom )) 
     30                                      ffado_smartptr<ConfigRom>( configRom )) 
    3131    : BeBoB::Device( d , configRom) 
    3232{ 
  • trunk/libffado/src/bebob/edirol/edirol_fa66.h

    r1543 r2691  
    3333public: 
    3434    EdirolFa66Device( DeviceManager& d, 
    35                        std::auto_ptr<ConfigRom>( configRom )); 
     35                       ffado_smartptr<ConfigRom>( configRom )); 
    3636    virtual ~EdirolFa66Device(); 
    3737 
  • trunk/libffado/src/bebob/esi/quatafire610.cpp

    r1543 r2691  
    2929namespace ESI { 
    3030 
    31 QuataFireDevice::QuataFireDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     31QuataFireDevice::QuataFireDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    3232    : BeBoB::Device( d, configRom) 
    3333{ 
  • trunk/libffado/src/bebob/esi/quatafire610.h

    r1543 r2691  
    3434 
    3535public: 
    36     QuataFireDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     36    QuataFireDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    3737    virtual ~QuataFireDevice(); 
    3838 
  • trunk/libffado/src/bebob/focusrite/focusrite_generic.cpp

    r2651 r2691  
    3030namespace Focusrite { 
    3131 
    32 FocusriteDevice::FocusriteDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     32FocusriteDevice::FocusriteDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    3333    : BeBoB::Device( d, configRom) 
    3434    , m_cmd_time_interval( 0 ) 
  • trunk/libffado/src/bebob/focusrite/focusrite_generic.h

    r1742 r2691  
    227227class FocusriteDevice : public BeBoB::Device { 
    228228public: 
    229     FocusriteDevice(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     229    FocusriteDevice(DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    230230    virtual ~FocusriteDevice() {}; 
    231231 
  • trunk/libffado/src/bebob/focusrite/focusrite_saffire.cpp

    r2651 r2691  
    3030namespace Focusrite { 
    3131 
    32 SaffireDevice::SaffireDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     32SaffireDevice::SaffireDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    3333    : FocusriteDevice( d, configRom) 
    3434    , m_MixerContainer( NULL ) 
  • trunk/libffado/src/bebob/focusrite/focusrite_saffire.h

    r1498 r2691  
    270270class SaffireDevice : public FocusriteDevice { 
    271271public: 
    272     SaffireDevice(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     272    SaffireDevice(DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    273273    virtual ~SaffireDevice() {}; 
    274274 
  • trunk/libffado/src/bebob/focusrite/focusrite_saffirepro.cpp

    r2413 r2691  
    3434namespace Focusrite { 
    3535 
    36 SaffireProDevice::SaffireProDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     36SaffireProDevice::SaffireProDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    3737    : FocusriteDevice( d, configRom ) 
    3838    , m_MixerContainer( NULL ) 
  • trunk/libffado/src/bebob/focusrite/focusrite_saffirepro.h

    r1498 r2691  
    357357 
    358358public: 
    359     SaffireProDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     359    SaffireProDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    360360    virtual ~SaffireProDevice(); 
    361361 
  • trunk/libffado/src/bebob/mackie/onyxmixer.cpp

    r1543 r2691  
    2929namespace Mackie { 
    3030 
    31 OnyxMixerDevice::OnyxMixerDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     31OnyxMixerDevice::OnyxMixerDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    3232    : BeBoB::Device( d, configRom) 
    3333{ 
  • trunk/libffado/src/bebob/mackie/onyxmixer.h

    r1543 r2691  
    3434 
    3535public: 
    36     OnyxMixerDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     36    OnyxMixerDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    3737    virtual ~OnyxMixerDevice(); 
    3838 
  • trunk/libffado/src/bebob/maudio/normal_avdevice.cpp

    r2490 r2691  
    2929namespace Normal { 
    3030 
    31 Device::Device(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ), 
     31Device::Device(DeviceManager& d, ffado_smartptr<ConfigRom>( configRom ), 
    3232                           unsigned int modelId) 
    3333    : BeBoB::Device( d, configRom) 
  • trunk/libffado/src/bebob/maudio/normal_avdevice.h

    r2490 r2691  
    4343class Device : public BeBoB::Device { 
    4444public: 
    45     Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ), 
     45    Device( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom ), 
    4646                  unsigned int modelId); 
    4747    virtual ~Device(); 
  • trunk/libffado/src/bebob/maudio/special_avdevice.cpp

    r2529 r2691  
    3636namespace Special { 
    3737 
    38 Device::Device(DeviceManager& d, std::auto_ptr<ConfigRom>(configRom)) 
     38Device::Device(DeviceManager& d, ffado_smartptr<ConfigRom>(configRom)) 
    3939    : BeBoB::Device(d, configRom) 
    4040{ 
  • trunk/libffado/src/bebob/maudio/special_avdevice.h

    r2491 r2691  
    141141{ 
    142142public: 
    143     Device(DeviceManager& d, std::auto_ptr<ConfigRom>(configRom)); 
     143    Device(DeviceManager& d, ffado_smartptr<ConfigRom>(configRom)); 
    144144    virtual ~Device() {}; 
    145145    virtual void showDevice(); 
  • trunk/libffado/src/bebob/presonus/firebox_avdevice.cpp

    r2489 r2691  
    2929namespace Firebox { 
    3030 
    31 Device::Device(DeviceManager& d, std::auto_ptr<ConfigRom>(configRom)) 
     31Device::Device(DeviceManager& d, ffado_smartptr<ConfigRom>(configRom)) 
    3232    : BeBoB::Device( d, configRom) 
    3333{ 
  • trunk/libffado/src/bebob/presonus/firebox_avdevice.h

    r2489 r2691  
    3636class Device : public BeBoB::Device { 
    3737public: 
    38         Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     38        Device( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    3939    virtual ~Device(); 
    4040 
  • trunk/libffado/src/bebob/presonus/inspire1394_avdevice.cpp

    r2489 r2691  
    105105} 
    106106 
    107 Device::Device(DeviceManager& d, std::auto_ptr<ConfigRom>(configRom)) 
     107Device::Device(DeviceManager& d, ffado_smartptr<ConfigRom>(configRom)) 
    108108    : BeBoB::Device( d, configRom ) 
    109109{ 
  • trunk/libffado/src/bebob/presonus/inspire1394_avdevice.h

    r2489 r2691  
    4545class Device : public BeBoB::Device { 
    4646public: 
    47     Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     47    Device( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    4848    virtual ~Device(); 
    4949 
  • trunk/libffado/src/bebob/template/vendor_device.cpp

    r1543 r2691  
    2828 
    2929VendorDevice::VendorDevice( Ieee1394Service& ieee1394Service, 
    30                             std::auto_ptr<ConfigRom>( configRom )) 
     30                            ffado_smartptr<ConfigRom>( configRom )) 
    3131    : BeBoB::Device( ieee1394Service, configRom) 
    3232{ 
  • trunk/libffado/src/bebob/template/vendor_device.h

    r1543 r2691  
    3535public: 
    3636    VendorDevice( Ieee1394Service& ieee1394Service, 
    37               std::auto_ptr<ConfigRom>( configRom )); 
     37              ffado_smartptr<ConfigRom>( configRom )); 
    3838    virtual ~VendorDevice(); 
    3939 
  • trunk/libffado/src/bebob/terratec/terratec_device.cpp

    r1763 r2691  
    2929namespace Terratec { 
    3030 
    31 Phase88Device::Phase88Device(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     31Phase88Device::Phase88Device(DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    3232    : BeBoB::Device( d, configRom) 
    3333{ 
  • trunk/libffado/src/bebob/terratec/terratec_device.h

    r1763 r2691  
    3434class Phase88Device : public BeBoB::Device { 
    3535public: 
    36     Phase88Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     36    Phase88Device( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    3737    virtual ~Phase88Device(); 
    3838 
  • trunk/libffado/src/bebob/yamaha/yamaha_avdevice.cpp

    r2439 r2691  
    2929namespace Yamaha { 
    3030 
    31 GoDevice::GoDevice(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     31GoDevice::GoDevice(DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    3232    : BeBoB::Device( d, configRom) 
    3333{ 
  • trunk/libffado/src/bebob/yamaha/yamaha_avdevice.h

    r2439 r2691  
    3535class GoDevice : public BeBoB::Device { 
    3636public: 
    37     GoDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     37    GoDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    3838    virtual ~GoDevice(); 
    3939 
  • trunk/libffado/src/bounce/bounce_avdevice.cpp

    r1805 r2691  
    4343namespace Bounce { 
    4444 
    45 Device::Device( DeviceManager& d, std::auto_ptr< ConfigRom >( configRom ) ) 
     45Device::Device( DeviceManager& d, ffado_smartptr< ConfigRom >( configRom ) ) 
    4646    : FFADODevice( d, configRom ) 
    4747    , m_samplerate (44100) 
     
    7575 
    7676FFADODevice * 
    77 Device::createDevice(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     77Device::createDevice(DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    7878{ 
    7979    return new Device(d, configRom ); 
  • trunk/libffado/src/bounce/bounce_avdevice.h

    r1550 r2691  
    6565    class BounceNotifier; 
    6666public: 
    67     Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     67    Device( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    6868    virtual ~Device(); 
    6969 
    7070    static bool probe( Util::Configuration&, ConfigRom& configRom, bool generic = false ); 
    71     static FFADODevice * createDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     71    static FFADODevice * createDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    7272    virtual bool discover(); 
    7373 
  • trunk/libffado/src/bounce/bounce_slave_avdevice.cpp

    r1805 r2691  
    3838namespace Bounce { 
    3939 
    40 SlaveDevice::SlaveDevice( DeviceManager& d, std::auto_ptr< ConfigRom >( configRom ) ) 
     40SlaveDevice::SlaveDevice( DeviceManager& d, ffado_smartptr< ConfigRom >( configRom ) ) 
    4141    : Device( d, configRom ) 
    4242{ 
     
    5656 
    5757FFADODevice * 
    58 SlaveDevice::createDevice(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     58SlaveDevice::createDevice(DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    5959{ 
    6060    return new SlaveDevice(d, configRom ); 
  • trunk/libffado/src/bounce/bounce_slave_avdevice.h

    r1550 r2691  
    4545public: 
    4646 
    47     SlaveDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ) ); 
     47    SlaveDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom ) ); 
    4848    virtual ~SlaveDevice(); 
    4949 
    5050    static bool probe( Util::Configuration&, ConfigRom& configRom, bool generic = false ); 
    51     static FFADODevice * createDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     51    static FFADODevice * createDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    5252 
    5353    bool discover(); 
  • trunk/libffado/src/devicemanager.cpp

    r2450 r2691  
    710710        debugOutput( DEBUG_LEVEL_VERBOSE, "Starting in slave mode on node %d...\n", nodeId ); 
    711711 
    712         std::auto_ptr<ConfigRom> configRom = 
    713             std::auto_ptr<ConfigRom>( new ConfigRom( *portService, 
     712        ffado_smartptr<ConfigRom> configRom = 
     713            ffado_smartptr<ConfigRom>( new ConfigRom( *portService, 
    714714                                                     nodeId ) ); 
    715715        if ( !configRom->initialize() ) { 
     
    10321032    debugOutput( DEBUG_LEVEL_VERBOSE, "Trying BeBoB...\n" ); 
    10331033    if ( BeBoB::Device::probe( getConfiguration(), *configRom, generic ) ) { 
    1034         return BeBoB::Device::createDevice( *this, std::auto_ptr<ConfigRom>( configRom ) ); 
     1034        return BeBoB::Device::createDevice( *this, ffado_smartptr<ConfigRom>( configRom ) ); 
    10351035    } 
    10361036#endif 
     
    10391039    debugOutput( DEBUG_LEVEL_VERBOSE, "Trying ECHO Audio FireWorks...\n" ); 
    10401040    if ( FireWorks::Device::probe( getConfiguration(), *configRom, generic ) ) { 
    1041         return FireWorks::Device::createDevice( *this, std::auto_ptr<ConfigRom>( configRom ) ); 
     1041        return FireWorks::Device::createDevice( *this, ffado_smartptr<ConfigRom>( configRom ) ); 
    10421042    } 
    10431043#endif 
     
    10461046    debugOutput( DEBUG_LEVEL_VERBOSE, "Trying Oxford FW90x...\n" ); 
    10471047    if ( Oxford::Device::probe( getConfiguration(), *configRom, generic ) ) { 
    1048         return Oxford::Device::createDevice( *this, std::auto_ptr<ConfigRom>( configRom ) ); 
     1048        return Oxford::Device::createDevice( *this, ffado_smartptr<ConfigRom>( configRom ) ); 
    10491049    } 
    10501050#endif 
     
    10541054    debugOutput( DEBUG_LEVEL_VERBOSE, "Trying Generic AV/C...\n" ); 
    10551055    if ( GenericAVC::Device::probe( getConfiguration(), *configRom, generic ) ) { 
    1056         return GenericAVC::Device::createDevice( *this, std::auto_ptr<ConfigRom>( configRom ) ); 
     1056        return GenericAVC::Device::createDevice( *this, ffado_smartptr<ConfigRom>( configRom ) ); 
    10571057    } 
    10581058#endif 
     
    10611061    debugOutput( DEBUG_LEVEL_VERBOSE, "Trying Motu...\n" ); 
    10621062    if ( Motu::MotuDevice::probe( getConfiguration(), *configRom, generic ) ) { 
    1063         return Motu::MotuDevice::createDevice( *this, std::auto_ptr<ConfigRom>( configRom ) ); 
     1063        return Motu::MotuDevice::createDevice( *this, ffado_smartptr<ConfigRom>( configRom ) ); 
    10641064    } 
    10651065#endif 
     
    10681068    debugOutput( DEBUG_LEVEL_VERBOSE, "Trying Dice...\n" ); 
    10691069    if ( Dice::Device::probe( getConfiguration(), *configRom, generic ) ) { 
    1070         return Dice::Device::createDevice( *this, std::auto_ptr<ConfigRom>( configRom ) ); 
     1070        return Dice::Device::createDevice( *this, ffado_smartptr<ConfigRom>( configRom ) ); 
    10711071    } 
    10721072#endif 
     
    10751075    debugOutput( DEBUG_LEVEL_VERBOSE, "Trying Metric Halo...\n" ); 
    10761076    if ( MetricHalo::Device::probe( getConfiguration(), *configRom, generic ) ) { 
    1077         return MetricHalo::Device::createDevice( *this, std::auto_ptr<ConfigRom>( configRom ) ); 
     1077        return MetricHalo::Device::createDevice( *this, ffado_smartptr<ConfigRom>( configRom ) ); 
    10781078    } 
    10791079#endif 
     
    10821082    debugOutput( DEBUG_LEVEL_VERBOSE, "Trying RME...\n" ); 
    10831083    if ( Rme::Device::probe( getConfiguration(), *configRom, generic ) ) { 
    1084         return Rme::Device::createDevice( *this, std::auto_ptr<ConfigRom>( configRom ) ); 
     1084        return Rme::Device::createDevice( *this, ffado_smartptr<ConfigRom>( configRom ) ); 
    10851085    } 
    10861086#endif 
     
    10891089    debugOutput( DEBUG_LEVEL_VERBOSE, "Trying Bounce...\n" ); 
    10901090    if ( Bounce::Device::probe( getConfiguration(), *configRom, generic ) ) { 
    1091         return Bounce::Device::createDevice( *this, std::auto_ptr<ConfigRom>( configRom ) ); 
     1091        return Bounce::Device::createDevice( *this, ffado_smartptr<ConfigRom>( configRom ) ); 
    10921092    } 
    10931093#endif 
     
    11201120 
    11211121FFADODevice* 
    1122 DeviceManager::getSlaveDriver( std::auto_ptr<ConfigRom>( configRom ) ) 
     1122DeviceManager::getSlaveDriver( ffado_smartptr<ConfigRom>( configRom ) ) 
    11231123{ 
    11241124#ifdef ENABLE_BOUNCE 
    11251125    if ( Bounce::SlaveDevice::probe( getConfiguration(), *configRom, false ) ) { 
    1126         return Bounce::SlaveDevice::createDevice(  *this, std::auto_ptr<ConfigRom>( configRom ) ); 
     1126        return Bounce::SlaveDevice::createDevice(  *this, ffado_smartptr<ConfigRom>( configRom ) ); 
    11271127    } 
    11281128#endif 
  • trunk/libffado/src/devicemanager.h

    r2078 r2691  
    149149    FFADODevice* getDriverForDevice( ConfigRom *configRom, 
    150150                                     int id ); 
    151     FFADODevice* getSlaveDriver( std::auto_ptr<ConfigRom>( configRom ) ); 
     151    FFADODevice* getSlaveDriver( ffado_smartptr<ConfigRom>( configRom ) ); 
    152152 
    153153    void busresetHandler(Ieee1394Service &); 
  • trunk/libffado/src/dice/dice_avdevice.cpp

    r2651 r2691  
    6161namespace Dice { 
    6262 
    63 Device::Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     63Device::Device( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    6464    : FFADODevice( d, configRom ) 
    6565    , m_eap( NULL ) 
     
    126126 
    127127FFADODevice * 
    128 Device::createDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     128Device::createDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    129129{ 
    130130    unsigned int vendorId = configRom->getNodeVendorId(); 
  • trunk/libffado/src/dice/dice_avdevice.h

    r2430 r2691  
    6969public: 
    7070    /// constructor 
    71     Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     71    Device( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    7272    /// destructor 
    7373    ~Device(); 
    7474 
    7575    static bool probe( Util::Configuration& c, ConfigRom& configRom, bool generic = false ); 
    76     static FFADODevice * createDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     76    static FFADODevice * createDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    7777    virtual bool discover(); 
    7878 
  • trunk/libffado/src/dice/focusrite/saffire_56.cpp

    r2580 r2691  
    502502*/ 
    503503Saffire56::Saffire56( DeviceManager& d, 
    504                                         std::auto_ptr<ConfigRom>( configRom )) 
     504                                        ffado_smartptr<ConfigRom>( configRom )) 
    505505    : Dice::Device( d , configRom) 
    506506{ 
  • trunk/libffado/src/dice/focusrite/saffire_56.h

    r2580 r2691  
    9090public: 
    9191    Saffire56( DeviceManager& d, 
    92                   std::auto_ptr<ConfigRom>( configRom )); 
     92                  ffado_smartptr<ConfigRom>( configRom )); 
    9393    virtual ~Saffire56(); 
    9494 
  • trunk/libffado/src/dice/focusrite/saffire_pro14.cpp

    r2431 r2691  
    356356*/ 
    357357SaffirePro14::SaffirePro14( DeviceManager& d, 
    358                                         std::auto_ptr<ConfigRom>( configRom )) 
     358                                        ffado_smartptr<ConfigRom>( configRom )) 
    359359    : Dice::Device( d , configRom) 
    360360{ 
  • trunk/libffado/src/dice/focusrite/saffire_pro14.h

    r2431 r2691  
    9393public: 
    9494    SaffirePro14( DeviceManager& d, 
    95                   std::auto_ptr<ConfigRom>( configRom )); 
     95                  ffado_smartptr<ConfigRom>( configRom )); 
    9696    virtual ~SaffirePro14(); 
    9797 
  • trunk/libffado/src/dice/focusrite/saffire_pro24.cpp

    r2598 r2691  
    408408 
    409409SaffirePro24::SaffirePro24( DeviceManager& d, 
    410                             std::auto_ptr<ConfigRom>( configRom )) 
     410                            ffado_smartptr<ConfigRom>( configRom )) 
    411411    : Dice::Device(d , configRom) 
    412412{ 
  • trunk/libffado/src/dice/focusrite/saffire_pro24.h

    r2431 r2691  
    9292public: 
    9393    SaffirePro24( DeviceManager& d, 
    94                   std::auto_ptr<ConfigRom>( configRom )); 
     94                  ffado_smartptr<ConfigRom>( configRom )); 
    9595    ~SaffirePro24(); 
    9696 
  • trunk/libffado/src/dice/focusrite/saffire_pro26.cpp

    r2606 r2691  
    358358 
    359359SaffirePro26::SaffirePro26( DeviceManager& d, 
    360                             std::auto_ptr<ConfigRom>( configRom )) 
     360                            ffado_smartptr<ConfigRom>( configRom )) 
    361361    : Dice::Device(d , configRom) 
    362362{ 
  • trunk/libffado/src/dice/focusrite/saffire_pro26.h

    r2590 r2691  
    8080public: 
    8181    SaffirePro26( DeviceManager& d, 
    82                   std::auto_ptr<ConfigRom>( configRom )); 
     82                  ffado_smartptr<ConfigRom>( configRom )); 
    8383    ~SaffirePro26(); 
    8484 
  • trunk/libffado/src/dice/focusrite/saffire_pro40.cpp

    r2547 r2691  
    479479*/ 
    480480SaffirePro40::SaffirePro40( DeviceManager& d, 
    481                                         std::auto_ptr<ConfigRom>( configRom )) 
     481                                        ffado_smartptr<ConfigRom>( configRom )) 
    482482    : Dice::Device( d , configRom) 
    483483{ 
  • trunk/libffado/src/dice/focusrite/saffire_pro40.h

    r2547 r2691  
    8585public: 
    8686    SaffirePro40( DeviceManager& d, 
    87                   std::auto_ptr<ConfigRom>( configRom )); 
     87                  ffado_smartptr<ConfigRom>( configRom )); 
    8888    virtual ~SaffirePro40(); 
    8989 
  • trunk/libffado/src/dice/maudio/profire_2626.cpp

    r2433 r2691  
    363363  Device 
    364364*/ 
    365 Profire2626::Profire2626( DeviceManager& d, std::auto_ptr<ConfigRom>(configRom)) 
     365Profire2626::Profire2626( DeviceManager& d, ffado_smartptr<ConfigRom>(configRom)) 
    366366    : Dice::Device( d, configRom) 
    367367{ 
  • trunk/libffado/src/dice/maudio/profire_2626.h

    r2433 r2691  
    4444public: 
    4545    Profire2626( DeviceManager& d, 
    46                   std::auto_ptr<ConfigRom>( configRom )); 
     46                  ffado_smartptr<ConfigRom>( configRom )); 
    4747    virtual ~Profire2626(); 
    4848 
  • trunk/libffado/src/dice/presonus/firestudio_mobile.cpp

    r2578 r2691  
    154154*/ 
    155155FirestudioMobile::FirestudioMobile( DeviceManager& d, 
    156                                     std::auto_ptr<ConfigRom>( configRom )) 
     156                                    ffado_smartptr<ConfigRom>( configRom )) 
    157157    : Dice::Device( d , configRom) 
    158158{ 
  • trunk/libffado/src/dice/presonus/firestudio_mobile.h

    r2578 r2691  
    3838public: 
    3939    FirestudioMobile( DeviceManager& d, 
    40                   std::auto_ptr<ConfigRom>( configRom )); 
     40                  ffado_smartptr<ConfigRom>( configRom )); 
    4141    virtual ~FirestudioMobile(); 
    4242 
  • trunk/libffado/src/dice/presonus/firestudio_project.cpp

    r2257 r2691  
    155155*/ 
    156156FirestudioProject::FirestudioProject( DeviceManager& d, 
    157                                     std::auto_ptr<ConfigRom>( configRom )) 
     157                                    ffado_smartptr<ConfigRom>( configRom )) 
    158158    : Dice::Device( d , configRom) 
    159159{ 
  • trunk/libffado/src/dice/presonus/firestudio_project.h

    r2257 r2691  
    3737public: 
    3838    FirestudioProject( DeviceManager& d, 
    39                   std::auto_ptr<ConfigRom>( configRom )); 
     39                  ffado_smartptr<ConfigRom>( configRom )); 
    4040    virtual ~FirestudioProject(); 
    4141 
  • trunk/libffado/src/dice/presonus/firestudio_tube.cpp

    r2251 r2691  
    143143*/ 
    144144FirestudioTube::FirestudioTube( DeviceManager& d, 
    145                                     std::auto_ptr<ConfigRom>( configRom )) 
     145                                    ffado_smartptr<ConfigRom>( configRom )) 
    146146    : Dice::Device( d , configRom) 
    147147{ 
  • trunk/libffado/src/dice/presonus/firestudio_tube.h

    r2251 r2691  
    3737public: 
    3838    FirestudioTube( DeviceManager& d, 
    39                   std::auto_ptr<ConfigRom>( configRom )); 
     39                  ffado_smartptr<ConfigRom>( configRom )); 
    4040    virtual ~FirestudioTube(); 
    4141 
  • trunk/libffado/src/digidesign/digidesign_avdevice.cpp

    r1964 r2691  
    5252 
    5353Device::Device( DeviceManager& d, 
    54                       std::auto_ptr<ConfigRom>( configRom )) 
     54                      ffado_smartptr<ConfigRom>( configRom )) 
    5555    : FFADODevice( d, configRom ) 
    5656    , m_digidesign_model( DIGIDESIGN_MODEL_NONE ) 
     
    125125 
    126126FFADODevice * 
    127 Device::createDevice(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     127Device::createDevice(DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    128128{ 
    129129    return new Device(d, configRom ); 
  • trunk/libffado/src/digidesign/digidesign_avdevice.h

    r1964 r2691  
    5151 
    5252    Device( DeviceManager& d, 
    53                std::auto_ptr<ConfigRom>( configRom )); 
     53               ffado_smartptr<ConfigRom>( configRom )); 
    5454    virtual ~Device(); 
    5555 
     
    5959    static bool probe( Util::Configuration& c, ConfigRom& configRom, bool generic = false ); 
    6060    static FFADODevice * createDevice( DeviceManager& d, 
    61                                         std::auto_ptr<ConfigRom>( configRom )); 
     61                                        ffado_smartptr<ConfigRom>( configRom )); 
    6262    static int getConfigurationId( ); 
    6363    virtual bool discover(); 
  • trunk/libffado/src/ffadodevice.cpp

    r2019 r2691  
    4141IMPL_DEBUG_MODULE( FFADODevice, FFADODevice, DEBUG_LEVEL_NORMAL ); 
    4242 
    43 FFADODevice::FFADODevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ) ) 
     43FFADODevice::FFADODevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom ) ) 
    4444    : Control::Container(&d) 
    4545    , m_pConfigRom( configRom ) 
     
    100100 
    101101FFADODevice * 
    102 FFADODevice::createDevice(std::auto_ptr<ConfigRom>( x )) 
     102FFADODevice::createDevice(ffado_smartptr<ConfigRom>( x )) 
    103103{ 
    104104    // re-implement this!! 
  • trunk/libffado/src/ffadodevice.h

    r2587 r2691  
    3636#include <vector> 
    3737#include <string> 
     38 
     39// Prefer shared_ptr over auto_ptr if it is available 
     40#if __cplusplus >= 201103L 
     41#define ffado_smartptr std::shared_ptr 
     42#else 
     43#define ffado_smartptr std::auto_ptr 
     44#endif 
    3845 
    3946class DeviceManager; 
     
    6168{ 
    6269public: 
    63     FFADODevice( DeviceManager&, std::auto_ptr< ConfigRom >( configRom ) ); 
     70    FFADODevice( DeviceManager&, ffado_smartptr< ConfigRom >( configRom ) ); 
    6471 
    6572    virtual ~FFADODevice(); 
     
    129136     * @return a new instance of the AvDevice type, NULL when unsuccessful 
    130137     */ 
    131     static FFADODevice * createDevice( std::auto_ptr<ConfigRom>( x )); 
     138    static FFADODevice * createDevice( ffado_smartptr<ConfigRom>( x )); 
    132139 
    133140    /** 
     
    481488        {return m_pDeviceManager;}; 
    482489private: 
    483     std::auto_ptr<ConfigRom>( m_pConfigRom ); 
     490    ffado_smartptr<ConfigRom>( m_pConfigRom ); 
    484491    DeviceManager& m_pDeviceManager; 
    485492    Control::Container* m_genericContainer; 
  • trunk/libffado/src/fireworks/audiofire/audiofire_device.cpp

    r864 r2691  
    3030namespace ECHO { 
    3131 
    32 AudioFire::AudioFire( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     32AudioFire::AudioFire( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    3333    : FireWorks::Device( d, configRom) 
    3434{ 
  • trunk/libffado/src/fireworks/audiofire/audiofire_device.h

    r864 r2691  
    3535 
    3636public: 
    37     AudioFire( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     37    AudioFire( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    3838    virtual ~AudioFire(); 
    3939 
  • trunk/libffado/src/fireworks/fireworks_device.cpp

    r2599 r2691  
    5050namespace FireWorks { 
    5151 
    52 Device::Device(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     52Device::Device(DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    5353    : GenericAVC::Device( d, configRom) 
    5454    , m_poll_lock( new Util::PosixMutex("DEVPOLL") ) 
     
    183183 
    184184FFADODevice * 
    185 Device::createDevice(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     185Device::createDevice(DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    186186{ 
    187187    unsigned int vendorId = configRom->getNodeVendorId(); 
  • trunk/libffado/src/fireworks/fireworks_device.h

    r2519 r2691  
    5050     
    5151public: 
    52     Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ) ); 
     52    Device( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom ) ); 
    5353    virtual ~Device(); 
    5454     
    5555    static bool probe( Util::Configuration&, ConfigRom& configRom, bool generic = false ); 
    56     static FFADODevice * createDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     56    static FFADODevice * createDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    5757    virtual bool discover(); 
    5858 
  • trunk/libffado/src/genericavc/avc_avdevice.cpp

    r1791 r2691  
    5252IMPL_DEBUG_MODULE( Device, Device, DEBUG_LEVEL_NORMAL ); 
    5353 
    54 Device::Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     54Device::Device( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    5555    : FFADODevice( d, configRom ) 
    5656{ 
     
    109109 
    110110FFADODevice * 
    111 Device::createDevice(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     111Device::createDevice(DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    112112{ 
    113113    unsigned int vendorId = configRom->getNodeVendorId(); 
  • trunk/libffado/src/genericavc/avc_avdevice.h

    r1543 r2691  
    4848class Device : public FFADODevice, public AVC::Unit { 
    4949public: 
    50     Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     50    Device( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    5151    virtual ~Device(); 
    5252 
    5353    static bool probe( Util::Configuration&, ConfigRom& configRom, bool generic = false ); 
    5454    virtual bool discover(); 
    55     static FFADODevice * createDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     55    static FFADODevice * createDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    5656 
    5757    virtual bool serialize( std::string basePath, Util::IOSerialize& ser ) const; 
  • trunk/libffado/src/genericavc/stanton/scs.cpp

    r2651 r2691  
    3434 
    3535ScsDevice::ScsDevice( DeviceManager& d, 
    36                       std::auto_ptr<ConfigRom>( configRom )) 
     36                      ffado_smartptr<ConfigRom>( configRom )) 
    3737: GenericAVC::Device( d , configRom) 
    3838, m_hss1394handler( NULL ) 
  • trunk/libffado/src/genericavc/stanton/scs.h

    r1550 r2691  
    7171public: 
    7272    ScsDevice( DeviceManager& d, 
    73                std::auto_ptr<ConfigRom>( configRom )); 
     73               ffado_smartptr<ConfigRom>( configRom )); 
    7474    virtual ~ScsDevice(); 
    7575 
  • trunk/libffado/src/metrichalo/mh_avdevice.cpp

    r1543 r2691  
    4747 
    4848Device::Device( DeviceManager& d, 
    49                         std::auto_ptr<ConfigRom>( configRom )) 
     49                        ffado_smartptr<ConfigRom>( configRom )) 
    5050    : FFADODevice( d, configRom ) 
    5151{ 
     
    7676FFADODevice * 
    7777Device::createDevice( DeviceManager& d, 
    78                           std::auto_ptr<ConfigRom>( configRom )) 
     78                          ffado_smartptr<ConfigRom>( configRom )) 
    7979{ 
    8080    return new Device(d, configRom ); 
  • trunk/libffado/src/metrichalo/mh_avdevice.h

    r1543 r2691  
    4141public: 
    4242    Device( DeviceManager& d, 
    43                 std::auto_ptr<ConfigRom>( configRom )); 
     43                ffado_smartptr<ConfigRom>( configRom )); 
    4444    virtual ~Device(); 
    4545 
    4646    static bool probe( Util::Configuration& c, ConfigRom& configRom, bool generic = false ); 
    4747    static FFADODevice * createDevice( DeviceManager& d, 
    48                                        std::auto_ptr<ConfigRom>( configRom )); 
     48                                       ffado_smartptr<ConfigRom>( configRom )); 
    4949    static int getConfigurationId(); 
    5050    virtual bool discover(); 
  • trunk/libffado/src/motu/motu_avdevice.cpp

    r2651 r2691  
    316316}; 
    317317 
    318 MotuDevice::MotuDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     318MotuDevice::MotuDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    319319    : FFADODevice( d, configRom ) 
    320320    , m_motu_model( MOTU_MODEL_NONE ) 
     
    383383 
    384384FFADODevice * 
    385 MotuDevice::createDevice(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     385MotuDevice::createDevice(DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    386386{ 
    387387    return new MotuDevice(d, configRom); 
  • trunk/libffado/src/motu/motu_avdevice.h

    r2502 r2691  
    381381public: 
    382382 
    383     MotuDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ) ); 
     383    MotuDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom ) ); 
    384384    virtual ~MotuDevice(); 
    385385 
     
    388388 
    389389    static bool probe( Util::Configuration&, ConfigRom& configRom, bool generic = false ); 
    390     static FFADODevice * createDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     390    static FFADODevice * createDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    391391    static int getConfigurationId( ); 
    392392    virtual bool discover(); 
  • trunk/libffado/src/oxford/oxford_device.cpp

    r1543 r2691  
    4545namespace Oxford { 
    4646 
    47 Device::Device(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     47Device::Device(DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    4848    : GenericAVC::Device( d, configRom) 
    4949{ 
     
    121121 
    122122FFADODevice * 
    123 Device::createDevice(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     123Device::createDevice(DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    124124{ 
    125125    unsigned int vendorId = configRom->getNodeVendorId(); 
  • trunk/libffado/src/oxford/oxford_device.h

    r1543 r2691  
    4040 
    4141public: 
    42     Device( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom ) ); 
     42    Device( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom ) ); 
    4343    virtual ~Device(); 
    4444 
    4545    static bool probe( Util::Configuration&, ConfigRom& configRom, bool generic = false ); 
    46     static FFADODevice * createDevice( DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )); 
     46    static FFADODevice * createDevice( DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )); 
    4747    virtual bool discover(); 
    4848 
  • trunk/libffado/src/rme/rme_avdevice.cpp

    r2663 r2691  
    5959 
    6060Device::Device( DeviceManager& d, 
    61                       std::auto_ptr<ConfigRom>( configRom )) 
     61                      ffado_smartptr<ConfigRom>( configRom )) 
    6262    : FFADODevice( d, configRom ) 
    6363    , m_rme_model( RME_MODEL_NONE ) 
     
    372372 
    373373FFADODevice * 
    374 Device::createDevice(DeviceManager& d, std::auto_ptr<ConfigRom>( configRom )) 
     374Device::createDevice(DeviceManager& d, ffado_smartptr<ConfigRom>( configRom )) 
    375375{ 
    376376    return new Device(d, configRom ); 
  • trunk/libffado/src/rme/rme_avdevice.h

    r2663 r2691  
    7979 
    8080    Device( DeviceManager& d, 
    81                std::auto_ptr<ConfigRom>( configRom )); 
     81               ffado_smartptr<ConfigRom>( configRom )); 
    8282    virtual ~Device(); 
    8383 
     
    8787    static bool probe( Util::Configuration& c, ConfigRom& configRom, bool generic = false ); 
    8888    static FFADODevice * createDevice( DeviceManager& d, 
    89                                         std::auto_ptr<ConfigRom>( configRom )); 
     89                                        ffado_smartptr<ConfigRom>( configRom )); 
    9090    static int getConfigurationId( ); 
    9191    virtual bool discover(); 
  • trunk/libffado/support/firmware/fireworks-downloader.cpp

    r2651 r2691  
    245245 
    246246    DeviceManager d = DeviceManager(); 
    247     Device *dev = new Device(d, std::auto_ptr<ConfigRom>(configRom) ); 
     247    Device *dev = new Device(d, ffado_smartptr<ConfigRom>(configRom) ); 
    248248    if (dev == NULL) { 
    249249        printMessage("Could not create FireWorks::Device\n"); 
  • trunk/libffado/tests/scan-devreg.cpp

    r2587 r2691  
    2929 
    3030#include "debugmodule/debugmodule.h" 
     31#include "ffadodevice.h"   // Needed for ffado_smartptr 
    3132 
    3233#include "libieee1394/configrom.h" 
     
    231232        } 
    232233        for (fb_nodeid_t node = n1; node < n2; node++) { 
    233             std::auto_ptr<ConfigRom> configRom = 
    234                 std::auto_ptr<ConfigRom>( new ConfigRom(*tmp1394, node)); 
     234            ffado_smartptr<ConfigRom> configRom = 
     235                ffado_smartptr<ConfigRom>( new ConfigRom(*tmp1394, node)); 
    235236            if (!configRom->initialize()) { 
    236237                continue;