Skip to contentSkip to conversation

input u-cleanup

PATCH Pavel Machek 3 participants 4 messages Aug 28, 2002 – Aug 30, 2002 Input drivers

lore
Share & tools
lore
#0 lore raw

Hi!

proc is clever enough not to need ifdefs, so this is probably good idea...

Pavel

drivers/input/input.c +0 -2
@@ -800,11 +803,9 @@
 
 static void __exit input_exit(void)
 {
-#ifdef CONFIG_PROC_FS
 	remove_proc_entry("devices", proc_bus_input_dir);
 	remove_proc_entry("handlers", proc_bus_input_dir);
 	remove_proc_entry("input", proc_bus);
-#endif
 	devfs_unregister(input_devfs_handle);
         if (unregister_chrdev(INPUT_MAJOR, "input"))
                 printk(KERN_ERR "input: can't unregister char major %d", INPUT_MAJOR);
Signature · 2 lines
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
#1 lore raw
Quoted 6 lines · Pavel Machek

Hi!

proc is clever enough not to need ifdefs, so this is probably good idea...

Pavel

If you could remove all the procfs #ifdefs from input.c, that'd be great. But removing only those around unregistration IMHO doesn't make sense.

Quoted 19 lines
drivers/input/input.c +0 -2
@@ -800,11 +803,9 @@
 
 static void __exit input_exit(void)
 {
-#ifdef CONFIG_PROC_FS
 	remove_proc_entry("devices", proc_bus_input_dir);
 	remove_proc_entry("handlers", proc_bus_input_dir);
 	remove_proc_entry("input", proc_bus);
-#endif
 	devfs_unregister(input_devfs_handle);
         if (unregister_chrdev(INPUT_MAJOR, "input"))
                 printk(KERN_ERR "input: can't unregister char major %d", INPUT_MAJOR);
Signature · 3 lines
-- 
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
Signature · 2 lines
Vojtech Pavlik
SuSE Labs
#2 lore raw

Hi!

Quoted 8 lines
Quoted 4 lines

proc is clever enough not to need ifdefs, so this is probably good idea...

Pavel

If you could remove all the procfs #ifdefs from input.c, that'd be great. But removing only those around unregistration IMHO doesn't make

Quoted 1 line

sense.

They can be safely dropped. I had patch to do that but droped it during
merge. If you'll accept complete patch, I'll create it. [Or you can
do it yourself, just killing #ifdef CONFIG_PROC_FS should do the trick].

Quoted 20 lines
Quoted 19 lines
drivers/input/input.c +0 -2
@@ -800,11 +803,9 @@
 
 static void __exit input_exit(void)
 {
-#ifdef CONFIG_PROC_FS
 	remove_proc_entry("devices", proc_bus_input_dir);
 	remove_proc_entry("handlers", proc_bus_input_dir);
 	remove_proc_entry("input", proc_bus);
-#endif
 	devfs_unregister(input_devfs_handle);
         if (unregister_chrdev(INPUT_MAJOR, "input"))
                 printk(KERN_ERR "input: can't unregister char major %d", INPUT_MAJOR);
Signature · 3 lines
-- 
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
Signature · 2 lines
Casualities in World Trade Center: ~3k dead inside the building,
cryptography in U.S.A. and free speech in Czech Republic.
#3 lore raw
Quoted 7 lines · Pavel Machek
Quoted 7 lines
Quoted 4 lines

proc is clever enough not to need ifdefs, so this is probably good idea...

Pavel

If you could remove all the procfs #ifdefs from input.c, that'd be great. But removing only those around unregistration IMHO doesn't make

Quoted 7 lines
Quoted 1 line
Quoted 1 line

sense.

They can be safely dropped. I had patch to do that but droped it during
merge. If you'll accept complete patch, I'll create it. [Or you can
do it yourself, just killing #ifdef CONFIG_PROC_FS should do the trick].

Yes, but a lot of functions unneeded without CONFIG_PROC_FS will remain linked in ... if you manage it down to one #ifdef, just around the functions, I'll take it.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs