提交 1d8b9e1b 编写于 作者: J Jean Delvare 提交者: Greg Kroah-Hartman

[PATCH] I2C: Kill i2c_algorithm.id (4/7)

There are no more users of i2c_algorithm.id, so we can finally drop
this structure member.
Signed-off-by: NJean Delvare <khali@linux-fr.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 87c3d7a8
...@@ -519,7 +519,6 @@ static u32 bit_func(struct i2c_adapter *adap) ...@@ -519,7 +519,6 @@ static u32 bit_func(struct i2c_adapter *adap)
/* -----exported algorithm data: ------------------------------------- */ /* -----exported algorithm data: ------------------------------------- */
static struct i2c_algorithm i2c_bit_algo = { static struct i2c_algorithm i2c_bit_algo = {
.id = I2C_ALGO_BIT,
.master_xfer = bit_xfer, .master_xfer = bit_xfer,
.functionality = bit_func, .functionality = bit_func,
}; };
......
...@@ -713,7 +713,6 @@ static u32 iic_func(struct i2c_adapter *adap) ...@@ -713,7 +713,6 @@ static u32 iic_func(struct i2c_adapter *adap)
/* -----exported algorithm data: ------------------------------------- */ /* -----exported algorithm data: ------------------------------------- */
static struct i2c_algorithm iic_algo = { static struct i2c_algorithm iic_algo = {
.id = I2C_ALGO_IIC,
.master_xfer = iic_xfer, .master_xfer = iic_xfer,
.algo_control = algo_control, /* ioctl */ .algo_control = algo_control, /* ioctl */
.functionality = iic_func, .functionality = iic_func,
......
...@@ -356,7 +356,6 @@ static int pca_init(struct i2c_algo_pca_data *adap) ...@@ -356,7 +356,6 @@ static int pca_init(struct i2c_algo_pca_data *adap)
} }
static struct i2c_algorithm pca_algo = { static struct i2c_algorithm pca_algo = {
.id = I2C_ALGO_PCA,
.master_xfer = pca_xfer, .master_xfer = pca_xfer,
.functionality = pca_func, .functionality = pca_func,
}; };
......
...@@ -459,7 +459,6 @@ static u32 pcf_func(struct i2c_adapter *adap) ...@@ -459,7 +459,6 @@ static u32 pcf_func(struct i2c_adapter *adap)
/* -----exported algorithm data: ------------------------------------- */ /* -----exported algorithm data: ------------------------------------- */
static struct i2c_algorithm pcf_algo = { static struct i2c_algorithm pcf_algo = {
.id = I2C_ALGO_PCF,
.master_xfer = pcf_xfer, .master_xfer = pcf_xfer,
.functionality = pcf_func, .functionality = pcf_func,
}; };
......
...@@ -158,7 +158,6 @@ static u32 sgi_func(struct i2c_adapter *adap) ...@@ -158,7 +158,6 @@ static u32 sgi_func(struct i2c_adapter *adap)
} }
static struct i2c_algorithm sgi_algo = { static struct i2c_algorithm sgi_algo = {
.id = I2C_ALGO_SGI,
.master_xfer = sgi_xfer, .master_xfer = sgi_xfer,
.functionality = sgi_func, .functionality = sgi_func,
}; };
......
...@@ -135,7 +135,6 @@ static u32 bit_func(struct i2c_adapter *adap) ...@@ -135,7 +135,6 @@ static u32 bit_func(struct i2c_adapter *adap)
/* -----exported algorithm data: ------------------------------------- */ /* -----exported algorithm data: ------------------------------------- */
static struct i2c_algorithm i2c_sibyte_algo = { static struct i2c_algorithm i2c_sibyte_algo = {
.id = I2C_ALGO_SIBYTE,
.smbus_xfer = smbus_xfer, .smbus_xfer = smbus_xfer,
.algo_control = algo_control, /* ioctl */ .algo_control = algo_control, /* ioctl */
.functionality = bit_func, .functionality = bit_func,
......
...@@ -472,7 +472,6 @@ static u32 ali1535_func(struct i2c_adapter *adapter) ...@@ -472,7 +472,6 @@ static u32 ali1535_func(struct i2c_adapter *adapter)
} }
static struct i2c_algorithm smbus_algorithm = { static struct i2c_algorithm smbus_algorithm = {
.id = I2C_ALGO_SMBUS,
.smbus_xfer = ali1535_access, .smbus_xfer = ali1535_access,
.functionality = ali1535_func, .functionality = ali1535_func,
}; };
......
...@@ -366,7 +366,6 @@ static void ali1563_shutdown(struct pci_dev *dev) ...@@ -366,7 +366,6 @@ static void ali1563_shutdown(struct pci_dev *dev)
} }
static struct i2c_algorithm ali1563_algorithm = { static struct i2c_algorithm ali1563_algorithm = {
.id = I2C_ALGO_SMBUS,
.smbus_xfer = ali1563_access, .smbus_xfer = ali1563_access,
.functionality = ali1563_func, .functionality = ali1563_func,
}; };
......
...@@ -462,7 +462,6 @@ static u32 ali15x3_func(struct i2c_adapter *adapter) ...@@ -462,7 +462,6 @@ static u32 ali15x3_func(struct i2c_adapter *adapter)
} }
static struct i2c_algorithm smbus_algorithm = { static struct i2c_algorithm smbus_algorithm = {
.id = I2C_ALGO_SMBUS,
.smbus_xfer = ali15x3_access, .smbus_xfer = ali15x3_access,
.functionality = ali15x3_func, .functionality = ali15x3_func,
}; };
......
...@@ -295,7 +295,6 @@ static u32 amd756_func(struct i2c_adapter *adapter) ...@@ -295,7 +295,6 @@ static u32 amd756_func(struct i2c_adapter *adapter)
} }
static struct i2c_algorithm smbus_algorithm = { static struct i2c_algorithm smbus_algorithm = {
.id = I2C_ALGO_SMBUS,
.smbus_xfer = amd756_access, .smbus_xfer = amd756_access,
.functionality = amd756_func, .functionality = amd756_func,
}; };
......
...@@ -323,7 +323,6 @@ static u32 amd8111_func(struct i2c_adapter *adapter) ...@@ -323,7 +323,6 @@ static u32 amd8111_func(struct i2c_adapter *adapter)
} }
static struct i2c_algorithm smbus_algorithm = { static struct i2c_algorithm smbus_algorithm = {
.id = I2C_ALGO_SMBUS,
.smbus_xfer = amd8111_access, .smbus_xfer = amd8111_access,
.functionality = amd8111_func, .functionality = amd8111_func,
}; };
......
...@@ -283,7 +283,6 @@ au1550_func(struct i2c_adapter *adap) ...@@ -283,7 +283,6 @@ au1550_func(struct i2c_adapter *adap)
} }
static struct i2c_algorithm au1550_algo = { static struct i2c_algorithm au1550_algo = {
.id = I2C_ALGO_AU1550,
.master_xfer = au1550_xfer, .master_xfer = au1550_xfer,
.functionality = au1550_func, .functionality = au1550_func,
}; };
......
...@@ -535,7 +535,6 @@ static u32 i801_func(struct i2c_adapter *adapter) ...@@ -535,7 +535,6 @@ static u32 i801_func(struct i2c_adapter *adapter)
} }
static struct i2c_algorithm smbus_algorithm = { static struct i2c_algorithm smbus_algorithm = {
.id = I2C_ALGO_SMBUS,
.smbus_xfer = i801_access, .smbus_xfer = i801_access,
.functionality = i801_func, .functionality = i801_func,
}; };
......
...@@ -627,7 +627,6 @@ static u32 iic_func(struct i2c_adapter *adap) ...@@ -627,7 +627,6 @@ static u32 iic_func(struct i2c_adapter *adap)
} }
static struct i2c_algorithm iic_algo = { static struct i2c_algorithm iic_algo = {
.id = I2C_ALGO_OCP,
.master_xfer = iic_xfer, .master_xfer = iic_xfer,
.functionality = iic_func .functionality = iic_func
}; };
......
...@@ -399,7 +399,6 @@ iop3xx_i2c_func(struct i2c_adapter *adap) ...@@ -399,7 +399,6 @@ iop3xx_i2c_func(struct i2c_adapter *adap)
} }
static struct i2c_algorithm iop3xx_i2c_algo = { static struct i2c_algorithm iop3xx_i2c_algo = {
.id = I2C_ALGO_IOP3XX,
.master_xfer = iop3xx_i2c_master_xfer, .master_xfer = iop3xx_i2c_master_xfer,
.algo_control = iop3xx_i2c_algo_control, .algo_control = iop3xx_i2c_algo_control,
.functionality = iop3xx_i2c_func, .functionality = iop3xx_i2c_func,
......
...@@ -43,7 +43,6 @@ static u32 isa_func(struct i2c_adapter *adapter); ...@@ -43,7 +43,6 @@ static u32 isa_func(struct i2c_adapter *adapter);
/* This is the actual algorithm we define */ /* This is the actual algorithm we define */
static struct i2c_algorithm isa_algorithm = { static struct i2c_algorithm isa_algorithm = {
.id = I2C_ALGO_ISA,
.functionality = isa_func, .functionality = isa_func,
}; };
......
...@@ -498,7 +498,6 @@ keywest_func(struct i2c_adapter * adapter) ...@@ -498,7 +498,6 @@ keywest_func(struct i2c_adapter * adapter)
/* For now, we only handle combined mode (smbus) */ /* For now, we only handle combined mode (smbus) */
static struct i2c_algorithm keywest_algorithm = { static struct i2c_algorithm keywest_algorithm = {
.id = I2C_ALGO_SMBUS,
.smbus_xfer = keywest_smbus_xfer, .smbus_xfer = keywest_smbus_xfer,
.master_xfer = keywest_xfer, .master_xfer = keywest_xfer,
.functionality = keywest_func, .functionality = keywest_func,
......
...@@ -272,7 +272,6 @@ static u32 mpc_functionality(struct i2c_adapter *adap) ...@@ -272,7 +272,6 @@ static u32 mpc_functionality(struct i2c_adapter *adap)
} }
static struct i2c_algorithm mpc_algo = { static struct i2c_algorithm mpc_algo = {
.id = I2C_ALGO_MPC107,
.master_xfer = mpc_xfer, .master_xfer = mpc_xfer,
.functionality = mpc_functionality, .functionality = mpc_functionality,
}; };
......
...@@ -433,7 +433,6 @@ mv64xxx_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) ...@@ -433,7 +433,6 @@ mv64xxx_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
} }
static struct i2c_algorithm mv64xxx_i2c_algo = { static struct i2c_algorithm mv64xxx_i2c_algo = {
.id = I2C_ALGO_MV64XXX,
.master_xfer = mv64xxx_i2c_xfer, .master_xfer = mv64xxx_i2c_xfer,
.functionality = mv64xxx_i2c_functionality, .functionality = mv64xxx_i2c_functionality,
}; };
......
...@@ -110,7 +110,6 @@ static u32 nforce2_func(struct i2c_adapter *adapter); ...@@ -110,7 +110,6 @@ static u32 nforce2_func(struct i2c_adapter *adapter);
static struct i2c_algorithm smbus_algorithm = { static struct i2c_algorithm smbus_algorithm = {
.id = I2C_ALGO_SMBUS,
.smbus_xfer = nforce2_access, .smbus_xfer = nforce2_access,
.functionality = nforce2_func, .functionality = nforce2_func,
}; };
......
...@@ -399,7 +399,6 @@ static u32 piix4_func(struct i2c_adapter *adapter) ...@@ -399,7 +399,6 @@ static u32 piix4_func(struct i2c_adapter *adapter)
} }
static struct i2c_algorithm smbus_algorithm = { static struct i2c_algorithm smbus_algorithm = {
.id = I2C_ALGO_SMBUS,
.smbus_xfer = piix4_access, .smbus_xfer = piix4_access,
.functionality = piix4_func, .functionality = piix4_func,
}; };
......
...@@ -357,7 +357,6 @@ static u32 sis5595_func(struct i2c_adapter *adapter) ...@@ -357,7 +357,6 @@ static u32 sis5595_func(struct i2c_adapter *adapter)
} }
static struct i2c_algorithm smbus_algorithm = { static struct i2c_algorithm smbus_algorithm = {
.id = I2C_ALGO_SMBUS,
.smbus_xfer = sis5595_access, .smbus_xfer = sis5595_access,
.functionality = sis5595_func, .functionality = sis5595_func,
}; };
......
...@@ -448,7 +448,6 @@ static int sis630_setup(struct pci_dev *sis630_dev) ...@@ -448,7 +448,6 @@ static int sis630_setup(struct pci_dev *sis630_dev)
static struct i2c_algorithm smbus_algorithm = { static struct i2c_algorithm smbus_algorithm = {
.id = I2C_ALGO_SMBUS,
.smbus_xfer = sis630_access, .smbus_xfer = sis630_access,
.functionality = sis630_func, .functionality = sis630_func,
}; };
......
...@@ -249,7 +249,6 @@ static u32 sis96x_func(struct i2c_adapter *adapter) ...@@ -249,7 +249,6 @@ static u32 sis96x_func(struct i2c_adapter *adapter)
} }
static struct i2c_algorithm smbus_algorithm = { static struct i2c_algorithm smbus_algorithm = {
.id = I2C_ALGO_SMBUS,
.smbus_xfer = sis96x_access, .smbus_xfer = sis96x_access,
.functionality = sis96x_func, .functionality = sis96x_func,
}; };
......
...@@ -109,7 +109,6 @@ static u32 stub_func(struct i2c_adapter *adapter) ...@@ -109,7 +109,6 @@ static u32 stub_func(struct i2c_adapter *adapter)
} }
static struct i2c_algorithm smbus_algorithm = { static struct i2c_algorithm smbus_algorithm = {
.id = I2C_ALGO_SMBUS,
.functionality = stub_func, .functionality = stub_func,
.smbus_xfer = stub_xfer, .smbus_xfer = stub_xfer,
}; };
......
...@@ -286,7 +286,6 @@ static u32 vt596_func(struct i2c_adapter *adapter) ...@@ -286,7 +286,6 @@ static u32 vt596_func(struct i2c_adapter *adapter)
} }
static struct i2c_algorithm smbus_algorithm = { static struct i2c_algorithm smbus_algorithm = {
.id = I2C_ALGO_SMBUS,
.smbus_xfer = vt596_access, .smbus_xfer = vt596_access,
.functionality = vt596_func, .functionality = vt596_func,
}; };
......
...@@ -395,7 +395,6 @@ static u32 scx200_acb_func(struct i2c_adapter *adapter) ...@@ -395,7 +395,6 @@ static u32 scx200_acb_func(struct i2c_adapter *adapter)
/* For now, we only handle combined mode (smbus) */ /* For now, we only handle combined mode (smbus) */
static struct i2c_algorithm scx200_acb_algorithm = { static struct i2c_algorithm scx200_acb_algorithm = {
.id = I2C_ALGO_SMBUS,
.smbus_xfer = scx200_acb_smbus_xfer, .smbus_xfer = scx200_acb_smbus_xfer,
.functionality = scx200_acb_func, .functionality = scx200_acb_func,
}; };
......
...@@ -387,7 +387,6 @@ static int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg *msg, in ...@@ -387,7 +387,6 @@ static int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg *msg, in
/* exported algorithm data */ /* exported algorithm data */
static struct i2c_algorithm saa7146_algo = { static struct i2c_algorithm saa7146_algo = {
.id = I2C_ALGO_SAA7146,
.master_xfer = saa7146_i2c_xfer, .master_xfer = saa7146_i2c_xfer,
.functionality = saa7146_i2c_func, .functionality = saa7146_i2c_func,
}; };
......
...@@ -172,7 +172,6 @@ static u32 flexcop_i2c_func(struct i2c_adapter *adapter) ...@@ -172,7 +172,6 @@ static u32 flexcop_i2c_func(struct i2c_adapter *adapter)
} }
static struct i2c_algorithm flexcop_algo = { static struct i2c_algorithm flexcop_algo = {
.id = I2C_ALGO_BIT,
.master_xfer = flexcop_master_xfer, .master_xfer = flexcop_master_xfer,
.functionality = flexcop_i2c_func, .functionality = flexcop_i2c_func,
}; };
......
...@@ -141,7 +141,6 @@ static u32 cxusb_i2c_func(struct i2c_adapter *adapter) ...@@ -141,7 +141,6 @@ static u32 cxusb_i2c_func(struct i2c_adapter *adapter)
} }
static struct i2c_algorithm cxusb_i2c_algo = { static struct i2c_algorithm cxusb_i2c_algo = {
.id = I2C_ALGO_BIT,
.master_xfer = cxusb_i2c_xfer, .master_xfer = cxusb_i2c_xfer,
.functionality = cxusb_i2c_func, .functionality = cxusb_i2c_func,
}; };
......
...@@ -156,7 +156,6 @@ static u32 dibusb_i2c_func(struct i2c_adapter *adapter) ...@@ -156,7 +156,6 @@ static u32 dibusb_i2c_func(struct i2c_adapter *adapter)
} }
struct i2c_algorithm dibusb_i2c_algo = { struct i2c_algorithm dibusb_i2c_algo = {
.id = I2C_ALGO_BIT,
.master_xfer = dibusb_i2c_xfer, .master_xfer = dibusb_i2c_xfer,
.functionality = dibusb_i2c_func, .functionality = dibusb_i2c_func,
}; };
......
...@@ -77,7 +77,6 @@ static u32 digitv_i2c_func(struct i2c_adapter *adapter) ...@@ -77,7 +77,6 @@ static u32 digitv_i2c_func(struct i2c_adapter *adapter)
} }
static struct i2c_algorithm digitv_i2c_algo = { static struct i2c_algorithm digitv_i2c_algo = {
.id = I2C_ALGO_BIT,
.master_xfer = digitv_i2c_xfer, .master_xfer = digitv_i2c_xfer,
.functionality = digitv_i2c_func, .functionality = digitv_i2c_func,
}; };
......
...@@ -1472,7 +1472,6 @@ static void frontend_init(struct ttusb* ttusb) ...@@ -1472,7 +1472,6 @@ static void frontend_init(struct ttusb* ttusb)
static struct i2c_algorithm ttusb_dec_algo = { static struct i2c_algorithm ttusb_dec_algo = {
.id = I2C_ALGO_BIT,
.master_xfer = master_xfer, .master_xfer = master_xfer,
.functionality = functionality, .functionality = functionality,
}; };
......
...@@ -270,7 +270,6 @@ static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int ...@@ -270,7 +270,6 @@ static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int
} }
static struct i2c_algorithm bttv_algo = { static struct i2c_algorithm bttv_algo = {
.id = I2C_ALGO_BIT | I2C_HW_B_BT848 /* FIXME */,
.master_xfer = bttv_i2c_xfer, .master_xfer = bttv_i2c_xfer,
.algo_control = algo_control, .algo_control = algo_control,
.functionality = functionality, .functionality = functionality,
......
...@@ -370,7 +370,6 @@ static int attach_inform(struct i2c_client *client) ...@@ -370,7 +370,6 @@ static int attach_inform(struct i2c_client *client)
} }
static struct i2c_algorithm saa7134_algo = { static struct i2c_algorithm saa7134_algo = {
.id = I2C_ALGO_SAA7134,
.master_xfer = saa7134_i2c_xfer, .master_xfer = saa7134_i2c_xfer,
.algo_control = algo_control, .algo_control = algo_control,
.functionality = functionality, .functionality = functionality,
......
...@@ -1573,7 +1573,6 @@ static int w9968cf_i2c_init(struct w9968cf_device* cam) ...@@ -1573,7 +1573,6 @@ static int w9968cf_i2c_init(struct w9968cf_device* cam)
int err = 0; int err = 0;
static struct i2c_algorithm algo = { static struct i2c_algorithm algo = {
.id = I2C_ALGO_SMBUS,
.smbus_xfer = w9968cf_i2c_smbus_xfer, .smbus_xfer = w9968cf_i2c_smbus_xfer,
.algo_control = w9968cf_i2c_control, .algo_control = w9968cf_i2c_control,
.functionality = w9968cf_i2c_func, .functionality = w9968cf_i2c_func,
......
...@@ -192,8 +192,6 @@ static inline char *i2c_clientname(struct i2c_client *c) ...@@ -192,8 +192,6 @@ static inline char *i2c_clientname(struct i2c_client *c)
* to name two of the most common. * to name two of the most common.
*/ */
struct i2c_algorithm { struct i2c_algorithm {
unsigned int id;
/* If an adapter algorithm can't do I2C-level access, set master_xfer /* If an adapter algorithm can't do I2C-level access, set master_xfer
to NULL. If an adapter algorithm can do SMBus access, set to NULL. If an adapter algorithm can do SMBus access, set
smbus_xfer. If set to NULL, the SMBus protocol is simulated smbus_xfer. If set to NULL, the SMBus protocol is simulated
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册