Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <tiwai@suse.de>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

authored by

Heiner Kallweit and committed by
Wolfram Sang
60be8006 fc033cf2

+1 -6
+1 -6
sound/ppc/keywest.c
··· 61 61 return -ENODEV; 62 62 } 63 63 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); 70 64 return 0; 71 65 } 72 66 ··· 93 99 void snd_pmac_keywest_cleanup(struct pmac_keywest *i2c) 94 100 { 95 101 if (keywest_ctx && keywest_ctx == i2c) { 102 + i2c_unregister_device(keywest_ctx->client); 96 103 i2c_del_driver(&keywest_driver); 97 104 keywest_ctx = NULL; 98 105 }