[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2.4] Fix bus reset in i2c-philips-par


Hi Marcelo,

This patch fixes the bus reset in i2c-philips-par when it is loaded with
type!=0. For now, the reset is always made as if type==0. This patch was
built and tested on 2.4.25-pre7.

I've committed a similar fix to our i2c CVS repository, and have sent
a patch to Greg KH for 2.6 too, which he already accepted.

This is a bug fix, however:
* I think that the i2c-philips-par driver isn't much used.
* I think that the i2c-philips-par driver with type!=0 is even less
  used.
* The bus reset is more or less optional. Skipping it doesn't hurt much.
* The wrong reset doesn't hurt either.
So this is in no way critical (and explains why the bug wasn't
discovered earlier).

On the other hand the fix is easy and clear. Anyway I leave it to you to
decide if it should be applied to 2.4 or not.

Thanks.

--- linux-2.4.25-pre7/drivers/i2c/i2c-philips-par.c.orig	Sun Jan 25 09:57:06 2004
+++ linux-2.4.25-pre7/drivers/i2c/i2c-philips-par.c	Sun Jan 25 09:59:36 2004
@@ -212,8 +212,8 @@
 
 	/* reset hardware to sane state */
 	parport_claim_or_block(adapter->pdev);
-	bit_lp_setsda(port, 1);
-	bit_lp_setscl(port, 1);
+	adapter->bit_lp_data.setsda(port, 1);
+	adapter->bit_lp_data.setscl(port, 1);
 	parport_release(adapter->pdev);
 
 	if (i2c_bit_add_bus(&adapter->adapter) < 0)

-- 
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo _at_ vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


この情報があなたの探していたものかどうか選択してください。
yes/まさにこれだ!   no/違うなぁ   part/一部見つかった   try/これで試してみる

あなたが探していた情報はどのようなことか、ご自由に記入下さい。特に「まさにこれだ!」と言う場合は記入をお願いします。
例:「複数のマシンからCATV経由でipmasqueradeを利用してWebを参照したい場合の設定について」