Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754655Ab3I3JTl (ORCPT ); Mon, 30 Sep 2013 05:19:41 -0400 Received: from cantor2.suse.de ([195.135.220.15]:54222 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751809Ab3I3JTi (ORCPT ); Mon, 30 Sep 2013 05:19:38 -0400 Date: Mon, 30 Sep 2013 11:22:07 +0200 Message-ID: From: Takashi Iwai To: Lars-Peter Clausen Cc: Wolfram Sang , David Airlie , Mauro Carvalho Chehab , Jaroslav Kysela , Liam Girdwood , Mark Brown , linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH 6/8] ALSA: ppc: keywest: Don't use i2c_client->driver In-Reply-To: <1380444666-12019-7-git-send-email-lars@metafoo.de> References: <1380444666-12019-1-git-send-email-lars@metafoo.de> <1380444666-12019-7-git-send-email-lars@metafoo.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.2 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1625 Lines: 50 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 Acked-by: Takashi Iwai 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 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/