lkml.org 
[lkml]   [2013]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/8] ALSA: ppc: keywest: Don't use i2c_client->driver
At Sun, 29 Sep 2013 10:51:04 +0200,
Lars-Peter Clausen wrote:
>
> 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 <lars@metafoo.de>

Acked-by: Takashi Iwai <tiwai@suse.de>


thanks,

Takashi

> ---
> sound/ppc/keywest.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/ppc/keywest.c b/sound/ppc/keywest.c
> index 01aecc2..0d1c27e 100644
> --- a/sound/ppc/keywest.c
> +++ b/sound/ppc/keywest.c
> @@ -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;
> @@ -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;
> }
>
> --
> 1.8.0
>


\
 
 \ /
  Last update: 2013-09-30 11:41    [W:0.669 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site