Skip to content

Commit 0746c4a

Browse files
committed
Merge branch 'i2c/for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fix from Wolfram Sang: "Regression fix for rc1 and stable kernels as well" * 'i2c/for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: core: Restore acpi_walk_dep_device_list() getting called after registering the ACPI i2c devs
2 parents c10037f + 8058d69 commit 0746c4a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

drivers/i2c/i2c-core-acpi.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ static acpi_status i2c_acpi_add_device(acpi_handle handle, u32 level,
264264
void i2c_acpi_register_devices(struct i2c_adapter *adap)
265265
{
266266
acpi_status status;
267+
acpi_handle handle;
267268

268269
if (!has_acpi_companion(&adap->dev))
269270
return;
@@ -274,6 +275,15 @@ void i2c_acpi_register_devices(struct i2c_adapter *adap)
274275
adap, NULL);
275276
if (ACPI_FAILURE(status))
276277
dev_warn(&adap->dev, "failed to enumerate I2C slaves\n");
278+
279+
if (!adap->dev.parent)
280+
return;
281+
282+
handle = ACPI_HANDLE(adap->dev.parent);
283+
if (!handle)
284+
return;
285+
286+
acpi_walk_dep_device_list(handle);
277287
}
278288

279289
static const struct acpi_device_id i2c_acpi_force_400khz_device_ids[] = {
@@ -719,7 +729,6 @@ int i2c_acpi_install_space_handler(struct i2c_adapter *adapter)
719729
return -ENOMEM;
720730
}
721731

722-
acpi_walk_dep_device_list(handle);
723732
return 0;
724733
}
725734

0 commit comments

Comments
 (0)