lm_sensors2/prog/detect sensors-detect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



unless I'm missing something, there are no more accesses to the bus
at that address in scan_adapter() after the detection function returns,
so it isn't necessary.

Jean Delvare wrote:
> Oh, and:
> 
>   if ($chip == 2) {
> 	# check for 'shadow' write-protect register at 0x30-37
> 	i2c_set_slave_addr($file,$addr - 0x20);
> 	if(i2c_smbus_write_quick($file,$SMBUS_WRITE) >= 0 &&
> 	   i2c_smbus_read_byte_data($file,0x80) == -1) {
> 		if($checksum == 0) {
> 			return (9, $addr - 0x20);
> 		} else {
> 			return (2, $addr - 0x20);
> 		}
> 	}
>   }
> 
> Shouldn't you restore the original slave address before returning?
> 



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux