X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=dtt%2Fds1621.c;h=494818131f1a2090017a07722203aa743e2b6174;hb=1b380ec225665e73959677f3893dc658c5925e05;hp=5c25f641d9dd00892afe288a48d18e2270f41e84;hpb=c609719b8d1b2dca590e0ed499016d041203e403;p=u-boot diff --git a/dtt/ds1621.c b/dtt/ds1621.c index 5c25f641d9..494818131f 100644 --- a/dtt/ds1621.c +++ b/dtt/ds1621.c @@ -29,7 +29,7 @@ #ifdef CONFIG_DTT_DS1621 #if !defined(CFG_EEPROM_PAGE_WRITE_ENABLE) || \ - (CFG_EEPROM_PAGE_WRITE_BITS < 1) + (CFG_EEPROM_PAGE_WRITE_BITS < 1) # error "CFG_EEPROM_PAGE_WRITE_ENABLE must be defined and CFG_EEPROM_PAGE_WRITE_BITS must be greater than 1 to use CONFIG_DTT_DS1621" #endif #include @@ -85,7 +85,7 @@ int dtt_write(int sensor, int reg, int val) * Calculate sensor address and register. * */ - sensor = DTT_I2C_DEV_CODE + (sensor & sensor); + sensor = DTT_I2C_DEV_CODE + (sensor & 0x07); /* * Handle various data sizes. @@ -188,4 +188,3 @@ int dtt_get_temp(int sensor) #endif /* CONFIG_DTT_DS1621 */ -