Re: 2.3.45 compile problems: (ac97_codec.c)

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Mon Feb 14 2000 - 12:25:06 EST


Frank de Lange wrote:
>
> Subject says most of it, here's the beef:
>
> ac97_codec.c: In function `ac97_mixer_ioctl':
> ac97_codec.c:383: `card' undeclared (first use in this function)
> ac97_codec.c:383: (Each undeclared identifier is reported only once
> ac97_codec.c:383: for each function it appears in.)
> ac97_codec.c: In function `ac97_probe_codec_Rsmp_b505a3f5':
> ac97_codec.c:499: warning: implicit declaration of function `arraysize'
> rm -f $TOPDIR/modules/NET_MODULES
> make[2]: *** [ac97_codec.o] Error 1

Does this patch fix things?

-- 
Jeff Garzik         | Writing software is
Building 1024       | more fun than working.
MandrakeSoft, Inc.  | 	-Anon

Index: drivers/sound/ac97_codec.c =================================================================== RCS file: /g/cvslan/linux_2_3/drivers/sound/ac97_codec.c,v retrieving revision 1.1.1.3.2.1 diff -u -r1.1.1.3.2.1 ac97_codec.c --- drivers/sound/ac97_codec.c 2000/02/14 05:18:17 1.1.1.3.2.1 +++ drivers/sound/ac97_codec.c 2000/02/14 17:23:58 @@ -31,6 +31,8 @@ #include "ac97_codec.h" +#define arraysize(x) (sizeof(x)/sizeof(*(x)) + static int ac97_read_mixer(struct ac97_codec *codec, int oss_channel); static void ac97_write_mixer(struct ac97_codec *codec, int oss_channel, unsigned int left, unsigned int right); @@ -380,7 +382,7 @@ return -EINVAL; /* do we ever want to touch the hardware? */ - val = codec->read_mixer(card, i); + val = codec->read_mixer(codec, i); /* val = codec->mixer_state[i]; */ break; } @@ -496,7 +498,7 @@ id1 = codec->codec_read(codec, AC97_VENDOR_ID1); id2 = codec->codec_read(codec, AC97_VENDOR_ID2); - for (i = 0, codec->name = NULL; i < arraysize (ac97_codec_ids[i]); i++) { + for (i = 0, codec->name = NULL; i < arraysize (ac97_codec_ids); i++) { if (ac97_codec_ids[i].id == ((id1 << 16) | id2)) { codec->name = ac97_codec_ids[i].name; codec->codec_init = ac97_codec_ids[i].init;

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:27 EST