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 (7/8)
Date: Sun, 11 Jan 2004 16:20:41 +0100 [thread overview]
Message-ID: <20040111162041.27fb51fa.khali@linux-fr.org> (raw)
In-Reply-To: <20040111144214.7a6a4e59.khali@linux-fr.org>
Clean up various i2c algorithms:
* Remove empty algo_control function (i2c-algo-bit, i2c-algo-pcf,
i2c-algo-sibyte).
* Convert i2c_algorithm init to C99 style (i2c-algo-bit, i2c-algo-ite,
i2c-algo-pcf, i2c-algo-sibyte).
Original patch by Kyösti Mälkki.
diff -ru linux-2.4.25-pre4-k6/drivers/i2c/i2c-algo-bit.c linux-2.4.25-pre4-k7/drivers/i2c/i2c-algo-bit.c
--- linux-2.4.25-pre4-k6/drivers/i2c/i2c-algo-bit.c Sat Jan 10 21:16:02 2004
+++ linux-2.4.25-pre4-k7/drivers/i2c/i2c-algo-bit.c Sun Jan 11 13:02:02 2004
@@ -494,12 +494,6 @@
return num;
}
-static int algo_control(struct i2c_adapter *adapter,
- unsigned int cmd, unsigned long arg)
-{
- return 0;
-}
-
static u32 bit_func(struct i2c_adapter *adap)
{
return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR |
@@ -510,14 +504,10 @@
/* -----exported algorithm data: ------------------------------------- */
static struct i2c_algorithm i2c_bit_algo = {
- "Bit-shift algorithm",
- I2C_ALGO_BIT,
- bit_xfer,
- NULL,
- NULL, /* slave_xmit */
- NULL, /* slave_recv */
- algo_control, /* ioctl */
- bit_func, /* functionality */
+ .name = "Bit-shift algorithm",
+ .id = I2C_ALGO_BIT,
+ .master_xfer = bit_xfer,
+ .functionality = bit_func,
};
/*
diff -ru linux-2.4.25-pre4-k6/drivers/i2c/i2c-algo-ite.c linux-2.4.25-pre4-k7/drivers/i2c/i2c-algo-ite.c
--- linux-2.4.25-pre4-k6/drivers/i2c/i2c-algo-ite.c Sat Jan 10 21:16:02 2004
+++ linux-2.4.25-pre4-k7/drivers/i2c/i2c-algo-ite.c Sun Jan 11 13:01:10 2004
@@ -727,14 +727,11 @@
/* -----exported algorithm data: ------------------------------------- */
static struct i2c_algorithm iic_algo = {
- "ITE IIC algorithm",
- I2C_ALGO_IIC,
- iic_xfer, /* master_xfer */
- NULL, /* smbus_xfer */
- NULL, /* slave_xmit */
- NULL, /* slave_recv */
- algo_control, /* ioctl */
- iic_func, /* functionality */
+ .name = "ITE IIC algorithm",
+ .id = I2C_ALGO_IIC,
+ .master_xfer = iic_xfer,
+ .algo_control = algo_control, /* ioctl */
+ .functionality = iic_func,
};
diff -ru linux-2.4.25-pre4-k6/drivers/i2c/i2c-algo-pcf.c linux-2.4.25-pre4-k7/drivers/i2c/i2c-algo-pcf.c
--- linux-2.4.25-pre4-k6/drivers/i2c/i2c-algo-pcf.c Sat Jan 10 21:16:02 2004
+++ linux-2.4.25-pre4-k7/drivers/i2c/i2c-algo-pcf.c Sun Jan 11 12:57:49 2004
@@ -426,12 +426,6 @@
return (i);
}
-static int algo_control(struct i2c_adapter *adapter,
- unsigned int cmd, unsigned long arg)
-{
- return 0;
-}
-
static u32 pcf_func(struct i2c_adapter *adap)
{
return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR |
@@ -441,14 +435,10 @@
/* -----exported algorithm data: ------------------------------------- */
static struct i2c_algorithm pcf_algo = {
- "PCF8584 algorithm",
- I2C_ALGO_PCF,
- pcf_xfer,
- NULL,
- NULL, /* slave_xmit */
- NULL, /* slave_recv */
- algo_control, /* ioctl */
- pcf_func, /* functionality */
+ .name = "PCF8584 algorithm",
+ .id = I2C_ALGO_PCF,
+ .master_xfer = pcf_xfer,
+ .functionality = pcf_func,
};
/*
diff -ru linux-2.4.25-pre4-k6/drivers/i2c/i2c-algo-sibyte.c linux-2.4.25-pre4-k7/drivers/i2c/i2c-algo-sibyte.c
--- linux-2.4.25-pre4-k6/drivers/i2c/i2c-algo-sibyte.c Sat Jan 10 21:16:02 2004
+++ linux-2.4.25-pre4-k7/drivers/i2c/i2c-algo-sibyte.c Sun Jan 11 12:56:49 2004
@@ -115,12 +115,6 @@
return 0;
}
-static int algo_control(struct i2c_adapter *adapter,
- unsigned int cmd, unsigned long arg)
-{
- return 0;
-}
-
static u32 bit_func(struct i2c_adapter *adap)
{
return (I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE |
@@ -131,14 +125,10 @@
/* -----exported algorithm data: ------------------------------------- */
static struct i2c_algorithm i2c_sibyte_algo = {
- "SiByte algorithm",
- I2C_ALGO_SIBYTE,
- NULL, /* master_xfer */
- smbus_xfer, /* smbus_xfer */
- NULL, /* slave_xmit */
- NULL, /* slave_recv */
- algo_control, /* ioctl */
- bit_func, /* functionality */
+ .name = "SiByte algorithm",
+ .id = I2C_ALGO_SIBYTE,
+ .smbus_xfer = smbus_xfer,
+ .functionality = bit_func,
};
/*
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
next prev parent reply other threads:[~2004-01-11 15:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-11 13:42 [PATCH 2.4] i2c cleanups, third wave Jean Delvare
2004-01-11 13:51 ` [PATCH 2.4] i2c cleanups, third wave (1/8) Jean Delvare
2004-01-11 13:59 ` [PATCH 2.4] i2c cleanups, third wave (2/8) Jean Delvare
2004-01-11 14:08 ` [PATCH 2.4] i2c cleanups, third wave (3/8) Jean Delvare
2004-01-11 14:50 ` [PATCH 2.4] i2c cleanups, third wave (4/8) Jean Delvare
2004-01-11 15:04 ` [PATCH 2.4] i2c cleanups, third wave (5/8) Jean Delvare
2004-01-11 15:10 ` [PATCH 2.4] i2c cleanups, third wave (6/8) Jean Delvare
2004-01-11 15:20 ` Jean Delvare [this message]
2004-01-11 15:28 ` [PATCH 2.4] i2c cleanups, third wave (8/8) Jean Delvare
2004-01-12 1:48 ` [PATCH 2.4] i2c cleanups, third wave Mike Fedyk
2004-01-14 18:30 ` Jean Delvare
2004-01-14 12:55 ` Marcelo Tosatti
2004-01-14 14:55 ` 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=20040111162041.27fb51fa.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox