Skip to content

Commit

Permalink
ALSA: keywest: Get rid of useless i2c_device_name() macro
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
Jean Delvare authored and tiwai committed May 14, 2009
1 parent a4d7749 commit 903dba1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions sound/ppc/keywest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -56,7 +52,7 @@ static int keywest_attach_adapter(struct i2c_adapter *adapter)
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));
Expand Down

0 comments on commit 903dba1

Please sign in to comment.