File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -474,15 +474,6 @@ void ResourceManager::Cleanup()
474474 delete rgb_controller;
475475 }
476476
477- std::vector<i2c_smbus_interface *> busses_copy = busses;
478-
479- busses.clear ();
480-
481- for (i2c_smbus_interface* bus : busses_copy)
482- {
483- delete bus;
484- }
485-
486477 /* -------------------------------------------------*\
487478 | Cleanup HID interface |
488479 \*-------------------------------------------------*/
@@ -645,14 +636,18 @@ void ResourceManager::DetectDevicesThreadFunction()
645636 detection_percent = 0 ;
646637
647638 /* -------------------------------------------------*\
648- | Detect i2c interfaces |
639+ | Detect i2c interfaces - only perform on first |
640+ | detection |
649641 \*-------------------------------------------------*/
650- LOG_NOTICE (" Detecting I2C interfaces" );
651-
652- for (unsigned int i2c_bus_detector_idx = 0 ; i2c_bus_detector_idx < i2c_bus_detectors.size () && detection_is_required.load (); i2c_bus_detector_idx++)
642+ if (busses.empty ())
653643 {
654- i2c_bus_detectors[i2c_bus_detector_idx]();
655- I2CBusListChanged ();
644+ LOG_NOTICE (" Detecting I2C interfaces" );
645+
646+ for (unsigned int i2c_bus_detector_idx = 0 ; i2c_bus_detector_idx < i2c_bus_detectors.size () && detection_is_required.load (); i2c_bus_detector_idx++)
647+ {
648+ i2c_bus_detectors[i2c_bus_detector_idx]();
649+ I2CBusListChanged ();
650+ }
656651 }
657652
658653 /* -------------------------------------------------*\
Original file line number Diff line number Diff line change @@ -507,6 +507,7 @@ void i2c_smbus_i801_detect()
507507
508508 if (hres)
509509 {
510+ LOG_NOTICE (" WMI query failed, i801 I2C bus detection aborted" );
510511 return ;
511512 }
512513
Original file line number Diff line number Diff line change @@ -201,6 +201,7 @@ void i2c_smbus_piix4_detect()
201201
202202 if (hres)
203203 {
204+ LOG_NOTICE (" WMI query failed, piix4 I2C bus detection aborted" );
204205 return ;
205206 }
206207
You can’t perform that action at this time.
0 commit comments