From: Andrew Morton <[email-masked]>

With CONFIG_FB_I810_I2C=n

drivers/video/i810/i810_main.c: In function `i810fb_find_init_mode':
drivers/video/i810/i810_main.c:1833: warning: unused variable `err'
drivers/video/i810/i810_main.c:1833: warning: unused variable `i'
drivers/video/i810/i810_main.c:1831: warning: unused variable `par'

and

drivers/built-in.o(.text+0x5a5a8): In function `i810fb_release_resource':
/tmp/distcc_1108/drivers/video/i810/i810_main.c:2036: undefined reference to `i810_delete_i2c_busses'

Cc: Antonino Daplas <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 drivers/video/i810/i810_main.c |    8 ++++++--
 drivers/video/i810/i810_main.h |   11 ++++++++++-
 2 files changed, 16 insertions(+), 3 deletions(-)

diff -puN drivers/video/i810/i810_main.h~i810fb-add-i2c-ddc-support-fix drivers/video/i810/i810_main.h
--- devel/drivers/video/i810/i810_main.h~i810fb-add-i2c-ddc-support-fix	2005-09-02 02:28:11.000000000 -0700
+++ devel-akpm/drivers/video/i810/i810_main.h	2005-09-02 02:28:11.000000000 -0700
@@ -83,12 +83,21 @@ extern int  i810fb_sync     (struct fb_i
 extern void i810fb_init_ringbuffer(struct fb_info *info);
 extern void i810fb_load_front     (u32 offset, struct fb_info *info);
 
+#ifdef CONFIG_FB_I810_I2C
 /* I2C */
 extern int i810_probe_i2c_connector(struct fb_info *info, u8 **out_edid,
 				    int conn);
 extern void i810_create_i2c_busses(struct i810fb_par *par);
 extern void i810_delete_i2c_busses(struct i810fb_par *par);
-
+#else
+static inline int i810_probe_i2c_connector(struct fb_info *info, u8 **out_edid,
+				    int conn)
+{
+	return 1;
+}
+static inline void i810_create_i2c_busses(struct i810fb_par *par) { }
+static inline void i810_delete_i2c_busses(struct i810fb_par *par) { }
+#endif
 
 /* Conditionals */
 #ifdef CONFIG_X86
diff -puN drivers/video/i810/i810_main.c~i810fb-add-i2c-ddc-support-fix drivers/video/i810/i810_main.c
--- devel/drivers/video/i810/i810_main.c~i810fb-add-i2c-ddc-support-fix	2005-09-02 02:28:14.000000000 -0700
+++ devel-akpm/drivers/video/i810/i810_main.c	2005-09-02 02:29:10.000000000 -0700
@@ -1828,9 +1828,13 @@ static void __devinit i810fb_find_init_m
 {
 	struct fb_videomode mode;
 	struct fb_var_screeninfo var;
-	struct i810fb_par *par = info->par;
 	struct fb_monspecs *specs = NULL;
-	int i, err, found = 0;
+	int found = 0;
+#ifdef CONFIG_FB_I810_I2C
+	int i
+	int err;
+	struct i810fb_par *par = info->par;
+#endif
 
 	INIT_LIST_HEAD(&info->modelist);
 	memset(&mode, 0, sizeof(struct fb_videomode));
_