Takashi Iwai wrote:
At Thu, 15 Feb 2007 16:40:17 +0200,
Constantine Gavrilov wrote:
  
+#define DSP_OPEN() \
+{ \
+	fd = lib_oss_pcm_open(file, oflag); \
+	if (fd >= 0) { \
+		int nfds; \
+		fds[fd] = calloc(sizeof(fd_t), 1); \
+		if (fds[fd] == NULL) { \
+			ops[FD_OSS_DSP].close(fd); \
+			errno = ENOMEM; \
+			return -1; \
+		} \
+		fds[fd]->class = FD_OSS_DSP; \
+		fds[fd]->oflags = oflag; \
+		nfds = lib_oss_pcm_poll_fds(fd); \
+		if (nfds > 0) { \
+			fds[fd]->poll_fds = nfds; \
+			poll_fds_add += nfds; \
+		} \
+	} \
+}
+
+#define MIXER_OPEN() \
+{ \
+	fd = lib_oss_mixer_open(file, oflag); \
+	if (fd >= 0) { \
+		fds[fd] = calloc(sizeof(fd_t), 1); \
+		if (fds[fd] == NULL) { \
+			ops[FD_OSS_MIXER].close(fd); \
+			errno = ENOMEM; \
+			return -1; \
+		} \
+		fds[fd]->class = FD_OSS_MIXER; \
+		fds[fd]->oflags = oflag; \
+	} \
+} 
    

These are not necessarily macros unlike DECL_OPEN.  Static functions
would be much better.  Could you fix it?


Thanks,

Takashi

  
OK. Attached.  Not changed in the bug tracking system as I could not find a way to remove original patch.
-- 
----------------------------------------
Constantine Gavrilov
Kernel Developer
Qlusters Software Ltd
1 Azrieli Center, Tel-Aviv
Phone: +972-3-6081977
Fax:   +972-3-6081841
----------------------------------------