Re: fs.h in sound.h?

From: Erik Mouw (J.A.K.Mouw@its.tudelft.nl)
Date: Fri May 12 2000 - 12:13:14 EST


On Fri, 12 May 2000 15:16:32 +0100 (BST), Russell King wrote:
> Erik Mouw writes:
>> IMHO include/linux/sound.h should include include/linux/fs.h, because
>> all register_sound_xxx() functions need a struct file_operations. Is there
>> a specific reason why it isn't included?
>
> Do they actually need the declarations of the elements of
> "struct file_operations" or just to know that it exists? If the latter,
> I would suggest adding "struct file_operations;" instead of yet another
> include dependency.

The functions in include/linux/sound.h do not really need it, although
every sound driver that wants to use register_sound_xxx() needs to fill
out a struct file_operations with the correct functions, so it doesn't
harm if we include include/linux/fs.h anyway.

> We're rapidly heading for a #include <linux/everything.h> header file -
> linux/fs.h and linux/mm.h are two of the major culpits of including
> virtually everything else (I think you get about 60% of the include
> files if you include those together).
>
> I did have a look at this area, and gave up because it required a major
> restructuring.

Agreed, it needs a major cleanup, but let's leave it to linux-2.5. In the
mean time, I think we can safely apply the following patch:

--- linux-2.3.99-pre6-orig/include/linux/sound.h Mon Jan 4 20:42:43 1999
+++ linux-2.3.99-pre6/include/linux/sound.h Fri May 12 19:08:17 2000
@@ -1,6 +1,8 @@
 /*
  * Sound core interface functions
  */
+
+#include <linux/fs.h>
  
 extern int register_sound_special(struct file_operations *fops, int unit);
 extern int register_sound_mixer(struct file_operations *fops, int dev);

Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/

- 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 : Mon May 15 2000 - 21:00:21 EST