From 238a1f946fe3279f36d232de3f4d2c2747be37f5 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Fri, 3 Oct 2003 08:32:22 -0700 Subject: [PATCH] [PATCH] janitor: fix toshiba for !CONFIG_PROC_FS From: Luiz Capitulino Fix warning in drivers/char/toshiba.c: `tosh_get_info' defined but not used --- drivers/char/toshiba.c | 5 ++++- include/linux/toshiba.h | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/char/toshiba.c b/drivers/char/toshiba.c index ec21a16ac052f..8a4ecd6316bd5 100644 --- a/drivers/char/toshiba.c +++ b/drivers/char/toshiba.c @@ -84,7 +84,6 @@ static int tosh_fn = 0; MODULE_PARM(tosh_fn, "i"); -static int tosh_get_info(char *, char **, off_t, int); static int tosh_ioctl(struct inode *, struct file *, unsigned int, unsigned long); @@ -103,6 +102,7 @@ static struct miscdevice tosh_device = { /* * Read the Fn key status */ +#ifdef CONFIG_PROC_FS static int tosh_fn_status(void) { unsigned char scan; @@ -119,6 +119,7 @@ static int tosh_fn_status(void) return (int) scan; } +#endif /* @@ -290,6 +291,7 @@ static int tosh_ioctl(struct inode *ip, struct file *fp, unsigned int cmd, /* * Print the information for /proc/toshiba */ +#ifdef CONFIG_PROC_FS int tosh_get_info(char *buffer, char **start, off_t fpos, int length) { char *temp; @@ -318,6 +320,7 @@ int tosh_get_info(char *buffer, char **start, off_t fpos, int length) return temp-buffer; } +#endif /* diff --git a/include/linux/toshiba.h b/include/linux/toshiba.h index 916e5e3a699b6..8e57735c2476d 100644 --- a/include/linux/toshiba.h +++ b/include/linux/toshiba.h @@ -33,4 +33,13 @@ typedef struct { unsigned int edi __attribute__ ((packed)); } SMMRegisters; +#ifdef CONFIG_PROC_FS +static int tosh_get_info(char *, char **, off_t, int); +#else /* !CONFIG_PROC_FS */ +inline int tosh_get_info(char *buffer, char **start, off_t fpos, int lenght) +{ + return 0; +} +#endif /* CONFIG_PROC_FS */ + #endif -- 2.53.0