* [lm-sensors] [PATCH 2.6] i2c: Fix incorrect ID uses
@ 2005-10-22 15:48 Jean Delvare
2005-10-22 16:16 ` [lm-sensors] " Antonino A. Daplas
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Jean Delvare @ 2005-10-22 15:48 UTC (permalink / raw)
To: lm-sensors
Hi all,
I am enqueuing the following patch. Driver authors are invited to Ack
their respective parts, or voice in if anything doesn't look OK.
Thanks.
Fix several incorrect uses and redefinitions of i2c IDs.
In particular:
* i2c algorithm IDs are gone;
* i2c IDs must not be defined outside of i2c-id.h.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
CC: Henk Vergonet <henk@god.dyndns.org>
CC: Antonino Daplas <adaplas@pol.net>
CC: Mark McClelland <mark@alpha.dyndns.org>
CC: Ladislav Michl <ladis@linux-mips.org>
CC: Mikael Nousiainen <tmnousia@cc.hut.fi>
---
drivers/i2c/busses/i2c-prosavage.c | 5 -----
drivers/media/video/indycam.c | 4 +---
drivers/media/video/saa7191.c | 8 +++-----
drivers/video/i810/i810-i2c.c | 5 +----
include/media/ovcamchip.h | 14 --------------
5 files changed, 5 insertions(+), 31 deletions(-)
--- linux-2.6.14-rc4.orig/drivers/i2c/busses/i2c-prosavage.c 2005-10-17 21:08:53.000000000 +0200
+++ linux-2.6.14-rc4/drivers/i2c/busses/i2c-prosavage.c 2005-10-22 14:23:00.000000000 +0200
@@ -83,11 +83,6 @@
/*
* i2c configuration
*/
-#ifndef I2C_HW_B_S3VIA
-#define I2C_HW_B_S3VIA 0x18 /* S3VIA ProSavage adapter */
-#endif
-
-/* delays */
#define CYCLE_DELAY 10
#define TIMEOUT (HZ / 2)
--- linux-2.6.14-rc4.orig/drivers/media/video/indycam.c 2005-10-18 22:49:10.000000000 +0200
+++ linux-2.6.14-rc4/drivers/media/video/indycam.c 2005-10-22 14:23:00.000000000 +0200
@@ -44,8 +44,6 @@
#define indycam_regdump(client)
#endif
-#define VINO_ADAPTER (I2C_ALGO_SGI | I2C_HW_SGI_VINO)
-
struct indycam {
struct i2c_client *client;
int version;
@@ -300,7 +298,7 @@
static int indycam_probe(struct i2c_adapter *adap)
{
/* Indy specific crap */
- if (adap->id = VINO_ADAPTER)
+ if (adap->id = I2C_HW_SGI_VINO)
return indycam_attach(adap, INDYCAM_ADDR, 0);
/* Feel free to add probe here :-) */
return -ENODEV;
--- linux-2.6.14-rc4.orig/drivers/media/video/saa7191.c 2005-10-18 22:49:10.000000000 +0200
+++ linux-2.6.14-rc4/drivers/media/video/saa7191.c 2005-10-22 14:23:00.000000000 +0200
@@ -33,8 +33,6 @@
MODULE_AUTHOR("Mikael Nousiainen <tmnousia@cc.hut.fi>");
MODULE_LICENSE("GPL");
-#define VINO_ADAPTER (I2C_ALGO_SGI | I2C_HW_SGI_VINO)
-
struct saa7191 {
struct i2c_client *client;
@@ -337,7 +335,7 @@
static int saa7191_probe(struct i2c_adapter *adap)
{
/* Always connected to VINO */
- if (adap->id = VINO_ADAPTER)
+ if (adap->id = I2C_HW_SGI_VINO)
return saa7191_attach(adap, SAA7191_ADDR, 0);
/* Feel free to add probe here :-) */
return -ENODEV;
@@ -364,7 +362,7 @@
cap->flags = VIDEO_DECODER_PAL | VIDEO_DECODER_NTSC |
VIDEO_DECODER_SECAM | VIDEO_DECODER_AUTO;
- cap->inputs = (client->adapter->id = VINO_ADAPTER) ? 2 : 1;
+ cap->inputs = (client->adapter->id = I2C_HW_SGI_VINO) ? 2 : 1;
cap->outputs = 1;
break;
}
@@ -422,7 +420,7 @@
int *iarg = arg;
switch (client->adapter->id) {
- case VINO_ADAPTER:
+ case I2C_HW_SGI_VINO:
return saa7191_set_input(client, *iarg);
default:
if (*iarg != 0)
--- linux-2.6.14-rc4.orig/drivers/video/i810/i810-i2c.c 2005-10-01 11:01:06.000000000 +0200
+++ linux-2.6.14-rc4/drivers/video/i810/i810-i2c.c 2005-10-22 15:06:24.000000000 +0200
@@ -128,8 +128,6 @@
return (0 != (i810_readl(mmio, GPIOA) & SDA_VAL_IN));
}
-#define I2C_ALGO_DDC_I810 0x0e0000
-#define I2C_ALGO_I2C_I810 0x0f0000
static int i810_setup_i2c_bus(struct i810fb_i2c_chan *chan, const char *name,
int conn)
{
@@ -139,16 +137,15 @@
chan->adapter.owner = THIS_MODULE;
chan->adapter.algo_data = &chan->algo;
chan->adapter.dev.parent = &chan->par->dev->dev;
+ chan->adapter.id = I2C_HW_B_I810;
switch (conn) {
case 1:
- chan->adapter.id = I2C_ALGO_DDC_I810;
chan->algo.setsda = i810ddc_setsda;
chan->algo.setscl = i810ddc_setscl;
chan->algo.getsda = i810ddc_getsda;
chan->algo.getscl = i810ddc_getscl;
break;
case 2:
- chan->adapter.id = I2C_ALGO_I2C_I810;
chan->algo.setsda = i810i2c_setsda;
chan->algo.setscl = i810i2c_setscl;
chan->algo.getsda = i810i2c_getsda;
--- linux-2.6.14-rc4.orig/include/media/ovcamchip.h 2004-12-24 22:35:40.000000000 +0100
+++ linux-2.6.14-rc4/include/media/ovcamchip.h 2005-10-22 14:23:00.000000000 +0200
@@ -17,20 +17,6 @@
#include <linux/videodev.h>
#include <linux/i2c.h>
-/* Remove these once they are officially defined */
-#ifndef I2C_DRIVERID_OVCAMCHIP
- #define I2C_DRIVERID_OVCAMCHIP 0xf00f
-#endif
-#ifndef I2C_HW_SMBUS_OV511
- #define I2C_HW_SMBUS_OV511 0xfe
-#endif
-#ifndef I2C_HW_SMBUS_OV518
- #define I2C_HW_SMBUS_OV518 0xff
-#endif
-#ifndef I2C_HW_SMBUS_OVFX2
- #define I2C_HW_SMBUS_OVFX2 0xfd
-#endif
-
/* --------------------------------- */
/* ENUMERATIONS */
/* --------------------------------- */
--
Jean Delvare
^ permalink raw reply [flat|nested] 8+ messages in thread
* [lm-sensors] Re: [PATCH 2.6] i2c: Fix incorrect ID uses
2005-10-22 15:48 [lm-sensors] [PATCH 2.6] i2c: Fix incorrect ID uses Jean Delvare
@ 2005-10-22 16:16 ` Antonino A. Daplas
2005-10-22 18:43 ` Jean Delvare
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Antonino A. Daplas @ 2005-10-22 16:16 UTC (permalink / raw)
To: lm-sensors
> --- linux-2.6.14-rc4.orig/drivers/video/i810/i810-i2c.c 2005-10-01 11:01:06.000000000 +0200
> +++ linux-2.6.14-rc4/drivers/video/i810/i810-i2c.c 2005-10-22 15:06:24.000000000 +0200
> @@ -128,8 +128,6 @@
> return (0 != (i810_readl(mmio, GPIOA) & SDA_VAL_IN));
> }
>
> -#define I2C_ALGO_DDC_I810 0x0e0000
> -#define I2C_ALGO_I2C_I810 0x0f0000
> static int i810_setup_i2c_bus(struct i810fb_i2c_chan *chan, const char *name,
> int conn)
> {
> @@ -139,16 +137,15 @@
> chan->adapter.owner = THIS_MODULE;
> chan->adapter.algo_data = &chan->algo;
> chan->adapter.dev.parent = &chan->par->dev->dev;
> + chan->adapter.id = I2C_HW_B_I810;
> switch (conn) {
> case 1:
> - chan->adapter.id = I2C_ALGO_DDC_I810;
> chan->algo.setsda = i810ddc_setsda;
> chan->algo.setscl = i810ddc_setscl;
> chan->algo.getsda = i810ddc_getsda;
> chan->algo.getscl = i810ddc_getscl;
> break;
> case 2:
> - chan->adapter.id = I2C_ALGO_I2C_I810;
> chan->algo.setsda = i810i2c_setsda;
> chan->algo.setscl = i810i2c_setscl;
> chan->algo.getsda = i810i2c_getsda;
Please exclude the i810-i2c chunk. I've already sent Andrew a patch
that does this and more.
Thanks.
Tony
^ permalink raw reply [flat|nested] 8+ messages in thread
* [lm-sensors] Re: [PATCH 2.6] i2c: Fix incorrect ID uses
2005-10-22 15:48 [lm-sensors] [PATCH 2.6] i2c: Fix incorrect ID uses Jean Delvare
2005-10-22 16:16 ` [lm-sensors] " Antonino A. Daplas
@ 2005-10-22 18:43 ` Jean Delvare
2005-10-24 10:48 ` henk
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2005-10-22 18:43 UTC (permalink / raw)
To: lm-sensors
Hi Tony,
> Please exclude the i810-i2c chunk. I've already sent Andrew a patch
> that does this and more.
OK, done.
Thanks,
--
Jean Delvare
^ permalink raw reply [flat|nested] 8+ messages in thread
* [lm-sensors] Re: [PATCH 2.6] i2c: Fix incorrect ID uses
2005-10-22 15:48 [lm-sensors] [PATCH 2.6] i2c: Fix incorrect ID uses Jean Delvare
2005-10-22 16:16 ` [lm-sensors] " Antonino A. Daplas
2005-10-22 18:43 ` Jean Delvare
@ 2005-10-24 10:48 ` henk
2005-10-24 15:12 ` Mark McClelland
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: henk @ 2005-10-24 10:48 UTC (permalink / raw)
To: lm-sensors
On Sat, Oct 22, 2005 at 03:48:30PM +0200, Jean Delvare wrote:
> Hi all,
>
> I am enqueuing the following patch. Driver authors are invited to Ack
> their respective parts, or voice in if anything doesn't look OK.
>
> Thanks.
>
> Fix several incorrect uses and redefinitions of i2c IDs.
> In particular:
> * i2c algorithm IDs are gone;
> * i2c IDs must not be defined outside of i2c-id.h.
>
> Signed-off-by: Jean Delvare <khali@linux-fr.org>
> CC: Henk Vddergonet <henk.at.god.dyndns.org>
> CC: Antonino Daplas <adaplas@pol.net>
> CC: Mark McClelland <mark@alpha.dyndns.org>
> CC: Ladislav Michl <ladis@linux-mips.org>
> CC: Mikael Nousiainen <tmnousia@cc.hut.fi>
>
> ---
> drivers/i2c/busses/i2c-prosavage.c | 5 -----
> +++ linux-2.6.14-rc4/drivers/i2c/busses/i2c-prosavage.c 2005-10-22 14:23:00.000000000 +0200
> @@ -83,11 +83,6 @@
> /*
> * i2c configuration
> */
> -#ifndef I2C_HW_B_S3VIA
> -#define I2C_HW_B_S3VIA 0x18 /* S3VIA ProSavage adapter */
> -#endif
> -
> -/* delays */
> #define CYCLE_DELAY 10
> #define TIMEOUT (HZ / 2)
>
Signed-off-by: Henk Vergonet <henk.at.god.dyndns.org>
Good to see some ifdefs removed.
regards,
Henk
^ permalink raw reply [flat|nested] 8+ messages in thread
* [lm-sensors] Re: [PATCH 2.6] i2c: Fix incorrect ID uses
2005-10-22 15:48 [lm-sensors] [PATCH 2.6] i2c: Fix incorrect ID uses Jean Delvare
` (2 preceding siblings ...)
2005-10-24 10:48 ` henk
@ 2005-10-24 15:12 ` Mark McClelland
2005-10-24 16:01 ` Ladislav Michl
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Mark McClelland @ 2005-10-24 15:12 UTC (permalink / raw)
To: lm-sensors
Jean Delvare wrote:
> Hi all,
>
> I am enqueuing the following patch. Driver authors are invited to Ack
> their respective parts, or voice in if anything doesn't look OK.
>
> Thanks.
>
> Fix several incorrect uses and redefinitions of i2c IDs.
> In particular:
> * i2c algorithm IDs are gone;
> * i2c IDs must not be defined outside of i2c-id.h.
>
> Signed-off-by: Jean Delvare <khali@linux-fr.org>
>
>
(...)
> --- linux-2.6.14-rc4.orig/include/media/ovcamchip.h 2004-12-24 22:35:40.000000000 +0100
> +++ linux-2.6.14-rc4/include/media/ovcamchip.h 2005-10-22 14:23:00.000000000 +0200
> @@ -17,20 +17,6 @@
> #include <linux/videodev.h>
> #include <linux/i2c.h>
>
> -/* Remove these once they are officially defined */
> -#ifndef I2C_DRIVERID_OVCAMCHIP
> - #define I2C_DRIVERID_OVCAMCHIP 0xf00f
> -#endif
> -#ifndef I2C_HW_SMBUS_OV511
> - #define I2C_HW_SMBUS_OV511 0xfe
> -#endif
> -#ifndef I2C_HW_SMBUS_OV518
> - #define I2C_HW_SMBUS_OV518 0xff
> -#endif
> -#ifndef I2C_HW_SMBUS_OVFX2
> - #define I2C_HW_SMBUS_OVFX2 0xfd
> -#endif
> -
> /* --------------------------------- */
> /* ENUMERATIONS */
> /* --------------------------------- */
>
>
Acked-by: Mark McClelland <mark@alpha.dyndns.org>
Thanks for cleaning this up!
BTW, someone might want to take a look at include/media/id.h. It could
stand to be cleaned up or deleted altogether:
===
/* FIXME: this temporarely, until these are included in linux/i2c-id.h */
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l5>
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l6>/*
drivers */
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l7>#ifndef
I2C_DRIVERID_TVMIXER
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l8>#
define I2C_DRIVERID_TVMIXER I2C_DRIVERID_EXP0
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l9>#endif
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l10>#ifndef
I2C_DRIVERID_TVAUDIO
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l11>#
define I2C_DRIVERID_TVAUDIO I2C_DRIVERID_EXP1
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l12>#endif
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l13>
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l14>/*
chips */
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l15>#ifndef
I2C_DRIVERID_DPL3518
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l16>#
define I2C_DRIVERID_DPL3518 I2C_DRIVERID_EXP2
#endif
#ifndef I2C_DRIVERID_TDA9873
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l19>#
define I2C_DRIVERID_TDA9873 I2C_DRIVERID_EXP3
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l20>#endif
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l21>#ifndef
I2C_DRIVERID_TDA9875
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l22>#
define I2C_DRIVERID_TDA9875 I2C_DRIVERID_EXP0+4
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l23>#endif
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l24>#ifndef
I2C_DRIVERID_PIC16C54_PV951
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l25>#
define I2C_DRIVERID_PIC16C54_PV951 I2C_DRIVERID_EXP0+5
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l26>#endif
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l27>#ifndef
I2C_DRIVERID_TDA7432
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l28>#
define I2C_DRIVERID_TDA7432 I2C_DRIVERID_EXP0+6
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l29>#endif
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l30>#ifndef
I2C_DRIVERID_TDA9874
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l31>#
define I2C_DRIVERID_TDA9874 I2C_DRIVERID_EXP0+7
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l32>#endif
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l33>#ifndef
I2C_DRIVERID_SAA6752HS
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l34>#
define I2C_DRIVERID_SAA6752HS I2C_DRIVERID_EXP0+8
<http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hm02c94cdc0db4dcb5b888ec95e2fe5f4f4beeae;hbº9e358fd04190a59e605c2963a15e014139a707;f=include/media/id.h#l35>#endif
===
--
Mark McClelland
mark@alpha.dyndns.org
mark@ovcam.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* [lm-sensors] Re: [PATCH 2.6] i2c: Fix incorrect ID uses
2005-10-22 15:48 [lm-sensors] [PATCH 2.6] i2c: Fix incorrect ID uses Jean Delvare
` (3 preceding siblings ...)
2005-10-24 15:12 ` Mark McClelland
@ 2005-10-24 16:01 ` Ladislav Michl
2005-10-24 16:39 ` Jean Delvare
2005-10-24 19:40 ` Jean Delvare
6 siblings, 0 replies; 8+ messages in thread
From: Ladislav Michl @ 2005-10-24 16:01 UTC (permalink / raw)
To: lm-sensors
On Sat, Oct 22, 2005 at 03:48:30PM +0200, Jean Delvare wrote:
> Hi all,
Hi Jean,
> I am enqueuing the following patch. Driver authors are invited to Ack
> their respective parts, or voice in if anything doesn't look OK.
>
> Thanks.
>
> Fix several incorrect uses and redefinitions of i2c IDs.
> In particular:
> * i2c algorithm IDs are gone;
> * i2c IDs must not be defined outside of i2c-id.h.
>
> Signed-off-by: Jean Delvare <khali@linux-fr.org>
> CC: Henk Vergonet <henk@god.dyndns.org>
> CC: Antonino Daplas <adaplas@pol.net>
> CC: Mark McClelland <mark@alpha.dyndns.org>
> CC: Ladislav Michl <ladis@linux-mips.org>
> CC: Mikael Nousiainen <tmnousia@cc.hut.fi>
>
> ---
> drivers/i2c/busses/i2c-prosavage.c | 5 -----
> drivers/media/video/indycam.c | 4 +---
> drivers/media/video/saa7191.c | 8 +++-----
> drivers/video/i810/i810-i2c.c | 5 +----
> include/media/ovcamchip.h | 14 --------------
> 5 files changed, 5 insertions(+), 31 deletions(-)
[snip]
> --- linux-2.6.14-rc4.orig/drivers/media/video/indycam.c 2005-10-18 22:49:10.000000000 +0200
> +++ linux-2.6.14-rc4/drivers/media/video/indycam.c 2005-10-22 14:23:00.000000000 +0200
> @@ -44,8 +44,6 @@
> #define indycam_regdump(client)
> #endif
>
> -#define VINO_ADAPTER (I2C_ALGO_SGI | I2C_HW_SGI_VINO)
> -
> struct indycam {
> struct i2c_client *client;
> int version;
> @@ -300,7 +298,7 @@
> static int indycam_probe(struct i2c_adapter *adap)
> {
> /* Indy specific crap */
> - if (adap->id = VINO_ADAPTER)
> + if (adap->id = I2C_HW_SGI_VINO)
> return indycam_attach(adap, INDYCAM_ADDR, 0);
> /* Feel free to add probe here :-) */
> return -ENODEV;
> --- linux-2.6.14-rc4.orig/drivers/media/video/saa7191.c 2005-10-18 22:49:10.000000000 +0200
> +++ linux-2.6.14-rc4/drivers/media/video/saa7191.c 2005-10-22 14:23:00.000000000 +0200
> @@ -33,8 +33,6 @@
> MODULE_AUTHOR("Mikael Nousiainen <tmnousia@cc.hut.fi>");
> MODULE_LICENSE("GPL");
>
> -#define VINO_ADAPTER (I2C_ALGO_SGI | I2C_HW_SGI_VINO)
> -
> struct saa7191 {
> struct i2c_client *client;
>
> @@ -337,7 +335,7 @@
> static int saa7191_probe(struct i2c_adapter *adap)
> {
> /* Always connected to VINO */
> - if (adap->id = VINO_ADAPTER)
> + if (adap->id = I2C_HW_SGI_VINO)
> return saa7191_attach(adap, SAA7191_ADDR, 0);
> /* Feel free to add probe here :-) */
> return -ENODEV;
> @@ -364,7 +362,7 @@
>
> cap->flags = VIDEO_DECODER_PAL | VIDEO_DECODER_NTSC |
> VIDEO_DECODER_SECAM | VIDEO_DECODER_AUTO;
> - cap->inputs = (client->adapter->id = VINO_ADAPTER) ? 2 : 1;
> + cap->inputs = (client->adapter->id = I2C_HW_SGI_VINO) ? 2 : 1;
> cap->outputs = 1;
> break;
> }
> @@ -422,7 +420,7 @@
> int *iarg = arg;
>
> switch (client->adapter->id) {
> - case VINO_ADAPTER:
> + case I2C_HW_SGI_VINO:
> return saa7191_set_input(client, *iarg);
> default:
> if (*iarg != 0)
Please exclude above change. I already fixed driver in linux-mips.org
CVS (git these times) [1] and change was sent upstream [2] by Ralf Baechle
- linux-mips maintainer.
[1] http://www.linux-mips.org/git?p=linux.git;a=commit;h’6d27c6a322902c5c3adef607c45f0f36ee21fb
[2] http://marc.theaimsgroup.com/?l=linux-video&m\x112954391812094&w=2
Best regards,
ladis
^ permalink raw reply [flat|nested] 8+ messages in thread
* [lm-sensors] Re: [PATCH 2.6] i2c: Fix incorrect ID uses
2005-10-22 15:48 [lm-sensors] [PATCH 2.6] i2c: Fix incorrect ID uses Jean Delvare
` (4 preceding siblings ...)
2005-10-24 16:01 ` Ladislav Michl
@ 2005-10-24 16:39 ` Jean Delvare
2005-10-24 19:40 ` Jean Delvare
6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2005-10-24 16:39 UTC (permalink / raw)
To: lm-sensors
Hi Mark,
On 2005-10-24, Mark McClelland wrote:
> Thanks for cleaning this up!
>
> BTW, someone might want to take a look at include/media/id.h. It could
> stand to be cleaned up or deleted altogether:
You're right. I'll do a second patch for these ones, thanks for
pointing this out. Deleting the file sounds sane, it makes no sense to
have such a file in-tree.
--
Jean Delvare
^ permalink raw reply [flat|nested] 8+ messages in thread
* [lm-sensors] Re: [PATCH 2.6] i2c: Fix incorrect ID uses
2005-10-22 15:48 [lm-sensors] [PATCH 2.6] i2c: Fix incorrect ID uses Jean Delvare
` (5 preceding siblings ...)
2005-10-24 16:39 ` Jean Delvare
@ 2005-10-24 19:40 ` Jean Delvare
6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2005-10-24 19:40 UTC (permalink / raw)
To: lm-sensors
Hi Ladislav,
> Please exclude above change. I already fixed driver in linux-mips.org
> CVS (git these times) [1] and change was sent upstream [2] by Ralf Baechle
> - linux-mips maintainer.
OK, done.
Thanks,
--
Jean Delvare
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-10-24 19:40 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-22 15:48 [lm-sensors] [PATCH 2.6] i2c: Fix incorrect ID uses Jean Delvare
2005-10-22 16:16 ` [lm-sensors] " Antonino A. Daplas
2005-10-22 18:43 ` Jean Delvare
2005-10-24 10:48 ` henk
2005-10-24 15:12 ` Mark McClelland
2005-10-24 16:01 ` Ladislav Michl
2005-10-24 16:39 ` Jean Delvare
2005-10-24 19:40 ` Jean Delvare
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.