All of lore.kernel.org
 help / color / mirror / Atom feed
From: ladis@linux-mips.org (Ladislav Michl)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] Re: [PATCH 2.6] i2c: Fix incorrect ID uses
Date: Mon, 24 Oct 2005 16:01:34 +0000	[thread overview]
Message-ID: <20051024140042.GA8183@orphique> (raw)
In-Reply-To: <20051022154830.0b7688ab.khali@linux-fr.org>

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

  parent reply	other threads:[~2005-10-24 16:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2005-10-24 16:39 ` Jean Delvare
2005-10-24 19:40 ` Jean Delvare

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=20051024140042.GA8183@orphique \
    --to=ladis@linux-mips.org \
    --cc=lm-sensors@vger.kernel.org \
    /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.