Merge branch 'i2c/for-current' into i2c/for-mergewindow

I missed the last chance to send this in for 6.9, so it now goes into
the 6.10 queue
This commit is contained in:
Wolfram Sang 2024-05-13 16:21:50 +02:00
commit f9dc0c4a14

View File

@ -445,6 +445,11 @@ static struct i2c_client *i2c_acpi_find_client_by_adev(struct acpi_device *adev)
return i2c_find_device_by_fwnode(acpi_fwnode_handle(adev));
}
static struct i2c_adapter *i2c_acpi_find_adapter_by_adev(struct acpi_device *adev)
{
return i2c_find_adapter_by_fwnode(acpi_fwnode_handle(adev));
}
static int i2c_acpi_notify(struct notifier_block *nb, unsigned long value,
void *arg)
{
@ -471,11 +476,17 @@ static int i2c_acpi_notify(struct notifier_block *nb, unsigned long value,
break;
client = i2c_acpi_find_client_by_adev(adev);
if (!client)
break;
if (client) {
i2c_unregister_device(client);
put_device(&client->dev);
}
adapter = i2c_acpi_find_adapter_by_adev(adev);
if (adapter) {
acpi_unbind_one(&adapter->dev);
put_device(&adapter->dev);
}
i2c_unregister_device(client);
put_device(&client->dev);
break;
}