All of lore.kernel.org
 help / color / mirror / Atom feed
From: khali@linux-fr.org (Jean Delvare)
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	LM Sensors <sensors@Stimpy.netroedge.com>
Subject: [PATCH 2.4] i2c cleanups, third wave (4/8)
Date: Thu, 19 May 2005 06:24:34 +0000	[thread overview]
Message-ID: <20040111155027.6e1e2b42.khali@linux-fr.org> (raw)
In-Reply-To: <20040111144214.7a6a4e59.khali@linux-fr.org>

This patch doesn't really focus on the i2c subsystem, but is still
i2c-related. It concerns the media/video subsystem, where I discovered a
few incorrectnesses as I was working on my i2c patches.

* i2c-old.c contains old init stuff, obviously inherted from the times
of linux 2.2, which should be cleared. The BUZ and LML33 drivers are now
i2c drivers, not i2c-old ones.
* The Makefile needs a few adjustements.
* saa7146.h should include i2c-old.h, not i2c.h.

The thin part of this patch that also applies to linux 2.6 has been sent
to Greg KH.


diff -ruN linux-2.4.24-pre3/drivers/media/video/i2c-old.c linux-2.4.24-pre3-k3/drivers/media/video/i2c-old.c
--- linux-2.4.24-pre3/drivers/media/video/i2c-old.c	2001-09-30 21:26:06.000000000 +0200
+++ linux-2.4.24-pre3-k3/drivers/media/video/i2c-old.c	2004-01-06 14:01:45.000000000 +0100
@@ -36,28 +36,11 @@
 static struct i2c_driver *drivers[I2C_DRIVER_MAX];
 static int bus_count = 0, driver_count = 0;
 
-#ifdef CONFIG_VIDEO_BUZ
-extern int saa7111_init(void);
-extern int saa7185_init(void);
-#endif
-#ifdef CONFIG_VIDEO_LML33
-extern int bt819_init(void);
-extern int bt856_init(void);
-#endif
-
 int i2c_init(void)
 {
 	printk(KERN_INFO "i2c: initialized%s\n",
 		scan ? " (i2c bus scan enabled)" : "");
-	/* anything to do here ? */
-#ifdef CONFIG_VIDEO_BUZ
-	saa7111_init();
-	saa7185_init();
-#endif
-#ifdef CONFIG_VIDEO_LML33
-	bt819_init();
-	bt856_init();
-#endif
+
 	return 0;
 }
 
diff -ruN linux-2.4.24-pre3/drivers/media/video/Makefile linux-2.4.24-pre3-k3/drivers/media/video/Makefile
--- linux-2.4.24-pre3/drivers/media/video/Makefile	2003-12-31 14:51:01.000000000 +0100
+++ linux-2.4.24-pre3-k3/drivers/media/video/Makefile	2004-01-06 14:01:14.000000000 +0100
@@ -40,7 +40,7 @@
 
 obj-$(CONFIG_VIDEO_ZR36120) += zoran.o i2c-old.o
 obj-$(CONFIG_I2C_PARPORT) += i2c-parport.o i2c-old.o
-obj-$(CONFIG_VIDEO_SAA5249) += saa5249.o i2c-old.o
+obj-$(CONFIG_VIDEO_SAA5249) += saa5249.o
 obj-$(CONFIG_VIDEO_CQCAM) += c-qcam.o
 obj-$(CONFIG_VIDEO_BWQCAM) += bw-qcam.o
 obj-$(CONFIG_VIDEO_W9966) += w9966.o
@@ -48,11 +48,10 @@
 obj-$(CONFIG_VIDEO_ZORAN_BUZ) += saa7111.o saa7185.o
 obj-$(CONFIG_VIDEO_ZORAN_DC10) += saa7110.o adv7175.o
 obj-$(CONFIG_VIDEO_ZORAN_LML33) += bt819.o bt856.o
-obj-$(CONFIG_VIDEO_LML33) += bt856.o bt819.o
 obj-$(CONFIG_VIDEO_PMS) += pms.o
 obj-$(CONFIG_VIDEO_PLANB) += planb.o
 obj-$(CONFIG_VIDEO_VINO) += saa7191.o indycam.o vino.o
-obj-$(CONFIG_VIDEO_STRADIS) += stradis.o
+obj-$(CONFIG_VIDEO_STRADIS) += stradis.o i2c-old.o
 obj-$(CONFIG_VIDEO_CPIA) += cpia.o
 obj-$(CONFIG_VIDEO_CPIA_PP) += cpia_pp.o
 obj-$(CONFIG_VIDEO_CPIA_USB) += cpia_usb.o
@@ -81,8 +80,8 @@
 
 fastdep:
 
-zoran.o: zr36120.o zr36120_i2c.o zr36120_mem.o
-	$(LD) $(LD_RFLAG) -r -o $@ zr36120.o zr36120_i2c.o zr36120_mem.o
+zoran.o: $(zoran-objs)
+	$(LD) $(LD_RFLAG) -r -o $@ $(zoran-objs)
 
 bttv.o: $(bttv-objs)
 	$(LD) $(LD_RFLAG) -r -o $@ $(bttv-objs)
diff -ruN linux-2.4.24-pre3/drivers/media/video/saa7146.h linux-2.4.24-pre3-k3/drivers/media/video/saa7146.h
--- linux-2.4.24-pre3/drivers/media/video/saa7146.h	2000-12-11 22:15:51.000000000 +0100
+++ linux-2.4.24-pre3-k3/drivers/media/video/saa7146.h	2004-01-06 14:02:45.000000000 +0100
@@ -25,7 +25,7 @@
 #include <linux/types.h>
 #include <linux/wait.h>
 
-#include <linux/i2c.h>
+#include <linux/i2c-old.h>
 #include <linux/videodev.h>
 
 #ifndef O_NONCAP  

-- 
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/

WARNING: multiple messages have this Message-ID (diff)
From: Jean Delvare <khali@linux-fr.org>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	LM Sensors <sensors@Stimpy.netroedge.com>
Subject: [PATCH 2.4] i2c cleanups, third wave (4/8)
Date: Sun, 11 Jan 2004 15:50:27 +0100	[thread overview]
Message-ID: <20040111155027.6e1e2b42.khali@linux-fr.org> (raw)
In-Reply-To: <20040111144214.7a6a4e59.khali@linux-fr.org>

This patch doesn't really focus on the i2c subsystem, but is still
i2c-related. It concerns the media/video subsystem, where I discovered a
few incorrectnesses as I was working on my i2c patches.

* i2c-old.c contains old init stuff, obviously inherted from the times
of linux 2.2, which should be cleared. The BUZ and LML33 drivers are now
i2c drivers, not i2c-old ones.
* The Makefile needs a few adjustements.
* saa7146.h should include i2c-old.h, not i2c.h.

The thin part of this patch that also applies to linux 2.6 has been sent
to Greg KH.


diff -ruN linux-2.4.24-pre3/drivers/media/video/i2c-old.c linux-2.4.24-pre3-k3/drivers/media/video/i2c-old.c
--- linux-2.4.24-pre3/drivers/media/video/i2c-old.c	2001-09-30 21:26:06.000000000 +0200
+++ linux-2.4.24-pre3-k3/drivers/media/video/i2c-old.c	2004-01-06 14:01:45.000000000 +0100
@@ -36,28 +36,11 @@
 static struct i2c_driver *drivers[I2C_DRIVER_MAX];
 static int bus_count = 0, driver_count = 0;
 
-#ifdef CONFIG_VIDEO_BUZ
-extern int saa7111_init(void);
-extern int saa7185_init(void);
-#endif
-#ifdef CONFIG_VIDEO_LML33
-extern int bt819_init(void);
-extern int bt856_init(void);
-#endif
-
 int i2c_init(void)
 {
 	printk(KERN_INFO "i2c: initialized%s\n",
 		scan ? " (i2c bus scan enabled)" : "");
-	/* anything to do here ? */
-#ifdef CONFIG_VIDEO_BUZ
-	saa7111_init();
-	saa7185_init();
-#endif
-#ifdef CONFIG_VIDEO_LML33
-	bt819_init();
-	bt856_init();
-#endif
+
 	return 0;
 }
 
diff -ruN linux-2.4.24-pre3/drivers/media/video/Makefile linux-2.4.24-pre3-k3/drivers/media/video/Makefile
--- linux-2.4.24-pre3/drivers/media/video/Makefile	2003-12-31 14:51:01.000000000 +0100
+++ linux-2.4.24-pre3-k3/drivers/media/video/Makefile	2004-01-06 14:01:14.000000000 +0100
@@ -40,7 +40,7 @@
 
 obj-$(CONFIG_VIDEO_ZR36120) += zoran.o i2c-old.o
 obj-$(CONFIG_I2C_PARPORT) += i2c-parport.o i2c-old.o
-obj-$(CONFIG_VIDEO_SAA5249) += saa5249.o i2c-old.o
+obj-$(CONFIG_VIDEO_SAA5249) += saa5249.o
 obj-$(CONFIG_VIDEO_CQCAM) += c-qcam.o
 obj-$(CONFIG_VIDEO_BWQCAM) += bw-qcam.o
 obj-$(CONFIG_VIDEO_W9966) += w9966.o
@@ -48,11 +48,10 @@
 obj-$(CONFIG_VIDEO_ZORAN_BUZ) += saa7111.o saa7185.o
 obj-$(CONFIG_VIDEO_ZORAN_DC10) += saa7110.o adv7175.o
 obj-$(CONFIG_VIDEO_ZORAN_LML33) += bt819.o bt856.o
-obj-$(CONFIG_VIDEO_LML33) += bt856.o bt819.o
 obj-$(CONFIG_VIDEO_PMS) += pms.o
 obj-$(CONFIG_VIDEO_PLANB) += planb.o
 obj-$(CONFIG_VIDEO_VINO) += saa7191.o indycam.o vino.o
-obj-$(CONFIG_VIDEO_STRADIS) += stradis.o
+obj-$(CONFIG_VIDEO_STRADIS) += stradis.o i2c-old.o
 obj-$(CONFIG_VIDEO_CPIA) += cpia.o
 obj-$(CONFIG_VIDEO_CPIA_PP) += cpia_pp.o
 obj-$(CONFIG_VIDEO_CPIA_USB) += cpia_usb.o
@@ -81,8 +80,8 @@
 
 fastdep:
 
-zoran.o: zr36120.o zr36120_i2c.o zr36120_mem.o
-	$(LD) $(LD_RFLAG) -r -o $@ zr36120.o zr36120_i2c.o zr36120_mem.o
+zoran.o: $(zoran-objs)
+	$(LD) $(LD_RFLAG) -r -o $@ $(zoran-objs)
 
 bttv.o: $(bttv-objs)
 	$(LD) $(LD_RFLAG) -r -o $@ $(bttv-objs)
diff -ruN linux-2.4.24-pre3/drivers/media/video/saa7146.h linux-2.4.24-pre3-k3/drivers/media/video/saa7146.h
--- linux-2.4.24-pre3/drivers/media/video/saa7146.h	2000-12-11 22:15:51.000000000 +0100
+++ linux-2.4.24-pre3-k3/drivers/media/video/saa7146.h	2004-01-06 14:02:45.000000000 +0100
@@ -25,7 +25,7 @@
 #include <linux/types.h>
 #include <linux/wait.h>
 
-#include <linux/i2c.h>
+#include <linux/i2c-old.h>
 #include <linux/videodev.h>
 
 #ifndef O_NONCAP  

-- 
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/

  parent reply	other threads:[~2005-05-19  6:24 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-11 13:42 [PATCH 2.4] i2c cleanups, third wave Jean Delvare
2005-05-19  6:24 ` Jean Delvare
2004-01-11 13:51 ` [PATCH 2.4] i2c cleanups, third wave (1/8) Jean Delvare
2005-05-19  6:24   ` Jean Delvare
2004-01-11 13:59 ` [PATCH 2.4] i2c cleanups, third wave (2/8) Jean Delvare
2005-05-19  6:24   ` Jean Delvare
2004-01-11 14:08 ` [PATCH 2.4] i2c cleanups, third wave (3/8) Jean Delvare
2005-05-19  6:24   ` Jean Delvare
2004-01-11 14:50 ` Jean Delvare [this message]
2005-05-19  6:24   ` [PATCH 2.4] i2c cleanups, third wave (4/8) Jean Delvare
2005-05-19  6:24   ` Marcelo Tosatti
2005-05-19  6:24   ` Jean Delvare
2004-01-11 15:04 ` [PATCH 2.4] i2c cleanups, third wave (5/8) Jean Delvare
2005-05-19  6:24   ` Jean Delvare
2004-01-11 15:10 ` [PATCH 2.4] i2c cleanups, third wave (6/8) Jean Delvare
2005-05-19  6:24   ` Jean Delvare
2004-01-11 15:20 ` [PATCH 2.4] i2c cleanups, third wave (7/8) Jean Delvare
2005-05-19  6:24   ` Jean Delvare
2004-01-11 15:28 ` [PATCH 2.4] i2c cleanups, third wave (8/8) Jean Delvare
2005-05-19  6:24   ` Jean Delvare
2004-01-12  1:48 ` [PATCH 2.4] i2c cleanups, third wave Mike Fedyk
2005-05-19  6:24   ` Mike Fedyk
2004-01-14 18:30   ` Jean Delvare
2005-05-19  6:24     ` Jean Delvare
2004-01-14 12:55 ` Marcelo Tosatti
2005-05-19  6:24   ` Marcelo Tosatti
2004-01-14 14:55   ` Jean Delvare
2005-05-19  6:24     ` Jean Delvare
2005-05-19  6:24 ` Mark M. Hoffman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040111155027.6e1e2b42.khali@linux-fr.org \
    --to=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    --cc=sensors@Stimpy.netroedge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.