From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx1.suse.de", Issuer "CAcert Class 3 Root" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 7480DDDFCC for ; Thu, 14 May 2009 22:43:28 +1000 (EST) Date: Thu, 14 May 2009 14:43:17 +0200 Message-ID: From: Takashi Iwai To: Jean Delvare Subject: Re: [PATCH] keywest: Get rid of useless i2c_device_name() macro In-Reply-To: <20090514143721.2954805e@hyperion.delvare> References: <20090514143721.2954805e@hyperion.delvare> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: alsa-devel@alsa-project.org, linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 > Cc: Benjamin Herrenschmidt 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 >