Skip to content

Commit 60be800

Browse files
hkallweitWolfram Sang
authored andcommitted
ALSA: ppc: Remove i2c client removal hack
The i2c_driver.clients list is internal to I2C core and is going to be removed. No driver should access it. Unregister the i2c client explicitly before deleting the i2c driver. Reviewed-by: Takashi Iwai <[email protected]> Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent fc033cf commit 60be800

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

sound/ppc/keywest.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,6 @@ static int keywest_attach_adapter(struct i2c_adapter *adapter)
6161
return -ENODEV;
6262
}
6363

64-
/*
65-
* Let i2c-core delete that device on driver removal.
66-
* This is safe because i2c-core holds the core_lock mutex for us.
67-
*/
68-
list_add_tail(&keywest_ctx->client->detected,
69-
&to_i2c_driver(keywest_ctx->client->dev.driver)->clients);
7064
return 0;
7165
}
7266

@@ -99,6 +93,7 @@ static struct i2c_driver keywest_driver = {
9993
void snd_pmac_keywest_cleanup(struct pmac_keywest *i2c)
10094
{
10195
if (keywest_ctx && keywest_ctx == i2c) {
96+
i2c_unregister_device(keywest_ctx->client);
10297
i2c_del_driver(&keywest_driver);
10398
keywest_ctx = NULL;
10499
}

0 commit comments

Comments
 (0)