Commit b129cd76 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fix CONFIG_PROCFS=n

From: Manfred Spraul <manfred@colorfullife.com>

three build fixes for CONFIG_PROC_FS=n:

include/linux/procfs.h:

 - add missing proc_pid_unhash, proc_pid_flush declarations.  static
   inline functions that do nothing.

 - move semicolons around for kclist_{add,del}.  gcc-3.2.2 doesn't like
   the current syntax.

drivers/net/pppoe.c:

 - proc_net doesn't exist if CONFIG_PROC_FS=n.

drivers/scsi/scsi_priv.h:

 - add missing brackets to macro definition.
parent a1b4b27a
......@@ -1129,7 +1129,9 @@ void __exit pppoe_exit(void)
dev_remove_pack(&pppoes_ptype);
dev_remove_pack(&pppoed_ptype);
unregister_netdevice_notifier(&pppoe_notifier);
#ifdef CONFIG_PROC_FS
remove_proc_entry("pppoe", proc_net);
#endif
}
module_init(pppoe_init);
......
......@@ -110,7 +110,7 @@ extern void scsi_exit_procfs(void);
# define scsi_proc_host_add(shost) do { } while (0)
# define scsi_proc_host_rm(shost) do { } while (0)
# define scsi_init_procfs() (0)
# define scsi_exit_procfs do { } while (0)
# define scsi_exit_procfs() do { } while (0)
#endif /* CONFIG_PROC_FS */
/* scsi_scan.c */
......
......@@ -187,6 +187,9 @@ static inline struct proc_dir_entry *proc_net_create(const char *name, mode_t mo
get_info_t *get_info) {return NULL;}
static inline void proc_net_remove(const char *name) {}
static inline struct dentry *proc_pid_unhash(struct task_struct *p) { return NULL; }
static inline void proc_pid_flush(struct dentry *proc_dentry) { }
static inline struct proc_dir_entry *create_proc_entry(const char *name,
mode_t mode, struct proc_dir_entry *parent) { return NULL; }
......@@ -212,6 +215,14 @@ static inline void proc_tty_unregister_driver(struct tty_driver *driver) {};
extern struct proc_dir_entry proc_root;
static inline void kclist_add(struct kcore_list *new, void *addr, size_t size)
{
}
static inline struct kcore_list * kclist_del(void *addr)
{
return NULL;
}
#endif /* CONFIG_PROC_FS */
struct proc_inode {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment