Skip to content

Commit

Permalink
ALSA: ppc: keywest: Don't use i2c_client->driver
Browse files Browse the repository at this point in the history
The 'driver' field of the i2c_client struct is redundant and is going to be
removed. Use 'to_i2c_driver(client->dev.driver)' instead to get direct
access to the i2c_driver struct.

Signed-off-by: Lars-Peter Clausen <[email protected]>
Acked-by: Takashi Iwai <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
  • Loading branch information
larsclausen authored and Wolfram Sang committed Oct 3, 2013
1 parent 395c994 commit a7cde6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/ppc/keywest.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static int keywest_attach_adapter(struct i2c_adapter *adapter)
* already bound. If not it means binding failed, and then there
* is no point in keeping the device instantiated.
*/
if (!keywest_ctx->client->driver) {
if (!keywest_ctx->client->dev.driver) {
i2c_unregister_device(keywest_ctx->client);
keywest_ctx->client = NULL;
return -ENODEV;
Expand All @@ -76,7 +76,7 @@ static int keywest_attach_adapter(struct i2c_adapter *adapter)
* This is safe because i2c-core holds the core_lock mutex for us.
*/
list_add_tail(&keywest_ctx->client->detected,
&keywest_ctx->client->driver->clients);
&to_i2c_driver(keywest_ctx->client->dev.driver)->clients);
return 0;
}

Expand Down

0 comments on commit a7cde6d

Please sign in to comment.