mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-01 10:43:43 +00:00
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:
commit
f9dc0c4a14
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user