From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754645AbZEQRcr (ORCPT ); Sun, 17 May 2009 13:32:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751499AbZEQRcg (ORCPT ); Sun, 17 May 2009 13:32:36 -0400 Received: from cantor.suse.de ([195.135.220.2]:37779 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750927AbZEQRcf (ORCPT ); Sun, 17 May 2009 13:32:35 -0400 Date: Sun, 17 May 2009 19:32:36 +0200 Message-ID: From: Takashi Iwai To: Julia Lawall Cc: timur@freescale.com, alsa-devel@alsa-project.org, linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH 3/3] sound: use dev_set_drvdata In-Reply-To: References: User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/22.3 (x86_64-suse-linux-gnu) MULE/5.0 (SAKAKI) 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 At Sun, 17 May 2009 11:29:21 +0200 (CEST), Julia Lawall wrote: > > From: Julia Lawall > > Eliminate direct accesses to the driver_data field. > cf 82ab13b26f15f49be45f15ccc96bfa0b81dfd015 > > The semantic patch that makes this change is as follows: > (http://www.emn.fr/x-info/coccinelle/) > > // > @@ > struct device *dev; > expression E; > type T; > @@ > > - dev->driver_data = (T)E > + dev_set_drvdata(dev, E) > > @@ > struct device *dev; > type T; > @@ > > - (T)dev->driver_data > + dev_get_drvdata(dev) > // > > Signed-off-by: Julia Lawall Applied now. Thanks. Takashi > > --- > sound/soc/fsl/fsl_ssi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff -u -p a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c > --- a/sound/soc/fsl/fsl_ssi.c > +++ b/sound/soc/fsl/fsl_ssi.c > @@ -674,7 +674,7 @@ struct snd_soc_dai *fsl_ssi_create_dai(s > ssi_private->dev = ssi_info->dev; > ssi_private->asynchronous = ssi_info->asynchronous; > > - ssi_private->dev->driver_data = fsl_ssi_dai; > + dev_set_drvdata(ssi_private->dev, fsl_ssi_dai); > > /* Initialize the the device_attribute structure */ > dev_attr->attr.name = "ssi-stats"; > -- > 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/ >