LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jean Delvare <khali@linux-fr.org>
Cc: alsa-devel@alsa-project.org, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] keywest: Get rid of useless i2c_device_name() macro
Date: Thu, 14 May 2009 14:43:17 +0200	[thread overview]
Message-ID: <s5hljozvore.wl%tiwai@suse.de> (raw)
In-Reply-To: <20090514143721.2954805e@hyperion.delvare>

At Thu, 14 May 2009 14:37:21 +0200,
Jean Delvare wrote:
> 
> The i2c_device_name() macro is used only once and doesn't have much
> value, it hurts redability more than it helps. Get rid of it.
> 
> Signed-off-by: Jean Delvare <khali@linux-fr.org>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Applied now.  Thanks.


Takashi

> ---
>  sound/ppc/keywest.c |    6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> --- linux-2.6.30-rc1.orig/sound/ppc/keywest.c	2009-04-10 16:22:08.000000000 +0200
> +++ linux-2.6.30-rc1/sound/ppc/keywest.c	2009-04-10 16:25:16.000000000 +0200
> @@ -33,10 +33,6 @@
>  static struct pmac_keywest *keywest_ctx;
>  
>  
> -#ifndef i2c_device_name
> -#define i2c_device_name(x)	((x)->name)
> -#endif
> -
>  static int keywest_probe(struct i2c_client *client,
>  			 const struct i2c_device_id *id)
>  {
> @@ -56,7 +52,7 @@ static int keywest_attach_adapter(struct
>  	if (! keywest_ctx)
>  		return -EINVAL;
>  
> -	if (strncmp(i2c_device_name(adapter), "mac-io", 6))
> +	if (strncmp(adapter->name, "mac-io", 6))
>  		return 0; /* ignored */
>  
>  	memset(&info, 0, sizeof(struct i2c_board_info));
> 
> 
> -- 
> Jean Delvare
> 

      reply	other threads:[~2009-05-14 12:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-14 12:37 [PATCH] keywest: Get rid of useless i2c_device_name() macro Jean Delvare
2009-05-14 12:43 ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hljozvore.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=khali@linux-fr.org \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox