summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/misc/eeprom/ee1004.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/misc/eeprom/ee1004.c b/drivers/misc/eeprom/ee1004.c
index 2e69024380b6..140bcb20f091 100644
--- a/drivers/misc/eeprom/ee1004.c
+++ b/drivers/misc/eeprom/ee1004.c
@@ -184,6 +184,8 @@ static int ee1004_read(void *priv, unsigned int off, void *val, size_t count)
static void ee1004_probe_temp_sensor(struct i2c_client *client)
{
struct i2c_board_info info = { .type = "jc42" };
+ unsigned short addr = 0x18 | (client->addr & 7);
+ unsigned short addr_list[] = { addr, I2C_CLIENT_END };
u8 byte14;
int ret;
@@ -192,9 +194,7 @@ static void ee1004_probe_temp_sensor(struct i2c_client *client)
if (ret != 1 || !(byte14 & BIT(7)))
return;
- info.addr = 0x18 | (client->addr & 7);
-
- i2c_new_client_device(client->adapter, &info);
+ i2c_new_scanned_device(client->adapter, &info, addr_list, NULL);
}
static void ee1004_cleanup(int idx, struct ee1004_bus_data *bd)