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

i2c-algo-bit: Discard the mdelay data struct member

i2c-algo-bit: Discard the mdelay data struct member

The i2c_algo_bit_data structure has an mdelay member, which is not
used by the algorithm code (the code has always been ifdef'd out.)
Let's discard it to save some code and memory.
Signed-off-by: NJean Delvare <khali@linux-fr.org>
Acked-by: NMauro Carvalho Chehab <mchehab@brturbo.com.br>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 8241cb14
...@@ -308,7 +308,6 @@ static struct i2c_algo_bit_data ioc_data = { ...@@ -308,7 +308,6 @@ static struct i2c_algo_bit_data ioc_data = {
.getsda = ioc_getsda, .getsda = ioc_getsda,
.getscl = ioc_getscl, .getscl = ioc_getscl,
.udelay = 80, .udelay = 80,
.mdelay = 80,
.timeout = 100 .timeout = 100
}; };
......
...@@ -354,10 +354,6 @@ static int sendbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg) ...@@ -354,10 +354,6 @@ static int sendbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
return (retval<0)? retval : -EFAULT; return (retval<0)? retval : -EFAULT;
/* got a better one ?? */ /* got a better one ?? */
} }
#if 0
/* from asm/delay.h */
__delay(adap->mdelay * (loops_per_sec / 1000) );
#endif
} }
return wrcount; return wrcount;
} }
......
...@@ -99,7 +99,6 @@ static struct i2c_algo_bit_data hydra_bit_data = { ...@@ -99,7 +99,6 @@ static struct i2c_algo_bit_data hydra_bit_data = {
.getsda = hydra_bit_getsda, .getsda = hydra_bit_getsda,
.getscl = hydra_bit_getscl, .getscl = hydra_bit_getscl,
.udelay = 5, .udelay = 5,
.mdelay = 5,
.timeout = HZ .timeout = HZ
}; };
......
...@@ -166,7 +166,6 @@ static struct i2c_algo_bit_data i810_i2c_bit_data = { ...@@ -166,7 +166,6 @@ static struct i2c_algo_bit_data i810_i2c_bit_data = {
.getsda = bit_i810i2c_getsda, .getsda = bit_i810i2c_getsda,
.getscl = bit_i810i2c_getscl, .getscl = bit_i810i2c_getscl,
.udelay = CYCLE_DELAY, .udelay = CYCLE_DELAY,
.mdelay = CYCLE_DELAY,
.timeout = TIMEOUT, .timeout = TIMEOUT,
}; };
...@@ -182,7 +181,6 @@ static struct i2c_algo_bit_data i810_ddc_bit_data = { ...@@ -182,7 +181,6 @@ static struct i2c_algo_bit_data i810_ddc_bit_data = {
.getsda = bit_i810ddc_getsda, .getsda = bit_i810ddc_getsda,
.getscl = bit_i810ddc_getscl, .getscl = bit_i810ddc_getscl,
.udelay = CYCLE_DELAY, .udelay = CYCLE_DELAY,
.mdelay = CYCLE_DELAY,
.timeout = TIMEOUT, .timeout = TIMEOUT,
}; };
......
...@@ -114,7 +114,6 @@ static int ixp2000_i2c_probe(struct platform_device *plat_dev) ...@@ -114,7 +114,6 @@ static int ixp2000_i2c_probe(struct platform_device *plat_dev)
drv_data->algo_data.getsda = ixp2000_bit_getsda; drv_data->algo_data.getsda = ixp2000_bit_getsda;
drv_data->algo_data.getscl = ixp2000_bit_getscl; drv_data->algo_data.getscl = ixp2000_bit_getscl;
drv_data->algo_data.udelay = 6; drv_data->algo_data.udelay = 6;
drv_data->algo_data.mdelay = 6;
drv_data->algo_data.timeout = 100; drv_data->algo_data.timeout = 100;
drv_data->adapter.id = I2C_HW_B_IXP2000, drv_data->adapter.id = I2C_HW_B_IXP2000,
......
...@@ -122,7 +122,6 @@ static int ixp4xx_i2c_probe(struct platform_device *plat_dev) ...@@ -122,7 +122,6 @@ static int ixp4xx_i2c_probe(struct platform_device *plat_dev)
drv_data->algo_data.getsda = ixp4xx_bit_getsda; drv_data->algo_data.getsda = ixp4xx_bit_getsda;
drv_data->algo_data.getscl = ixp4xx_bit_getscl; drv_data->algo_data.getscl = ixp4xx_bit_getscl;
drv_data->algo_data.udelay = 10; drv_data->algo_data.udelay = 10;
drv_data->algo_data.mdelay = 10;
drv_data->algo_data.timeout = 100; drv_data->algo_data.timeout = 100;
drv_data->adapter.id = I2C_HW_B_IXP4XX; drv_data->adapter.id = I2C_HW_B_IXP4XX;
......
...@@ -103,7 +103,6 @@ static struct i2c_algo_bit_data parport_algo_data = { ...@@ -103,7 +103,6 @@ static struct i2c_algo_bit_data parport_algo_data = {
.getsda = parport_getsda, .getsda = parport_getsda,
.getscl = parport_getscl, .getscl = parport_getscl,
.udelay = 50, .udelay = 50,
.mdelay = 50,
.timeout = HZ, .timeout = HZ,
}; };
......
...@@ -138,7 +138,6 @@ static struct i2c_algo_bit_data parport_algo_data = { ...@@ -138,7 +138,6 @@ static struct i2c_algo_bit_data parport_algo_data = {
.getsda = parport_getsda, .getsda = parport_getsda,
.getscl = parport_getscl, .getscl = parport_getscl,
.udelay = 60, .udelay = 60,
.mdelay = 60,
.timeout = HZ, .timeout = HZ,
}; };
......
...@@ -180,7 +180,6 @@ static int i2c_register_bus(struct pci_dev *dev, struct s_i2c_bus *p, void __iom ...@@ -180,7 +180,6 @@ static int i2c_register_bus(struct pci_dev *dev, struct s_i2c_bus *p, void __iom
p->algo.getsda = bit_s3via_getsda; p->algo.getsda = bit_s3via_getsda;
p->algo.getscl = bit_s3via_getscl; p->algo.getscl = bit_s3via_getscl;
p->algo.udelay = CYCLE_DELAY; p->algo.udelay = CYCLE_DELAY;
p->algo.mdelay = CYCLE_DELAY;
p->algo.timeout = TIMEOUT; p->algo.timeout = TIMEOUT;
p->algo.data = p; p->algo.data = p;
p->mmvga = mmvga; p->mmvga = mmvga;
......
...@@ -140,7 +140,6 @@ static struct i2c_algo_bit_data sav_i2c_bit_data = { ...@@ -140,7 +140,6 @@ static struct i2c_algo_bit_data sav_i2c_bit_data = {
.getsda = bit_savi2c_getsda, .getsda = bit_savi2c_getsda,
.getscl = bit_savi2c_getscl, .getscl = bit_savi2c_getscl,
.udelay = CYCLE_DELAY, .udelay = CYCLE_DELAY,
.mdelay = CYCLE_DELAY,
.timeout = TIMEOUT .timeout = TIMEOUT
}; };
......
...@@ -81,7 +81,6 @@ static struct i2c_algo_bit_data bit_data = { ...@@ -81,7 +81,6 @@ static struct i2c_algo_bit_data bit_data = {
.getsda = bit_via_getsda, .getsda = bit_via_getsda,
.getscl = bit_via_getscl, .getscl = bit_via_getscl,
.udelay = 5, .udelay = 5,
.mdelay = 5,
.timeout = HZ .timeout = HZ
}; };
......
...@@ -160,7 +160,6 @@ static struct i2c_algo_bit_data voo_i2c_bit_data = { ...@@ -160,7 +160,6 @@ static struct i2c_algo_bit_data voo_i2c_bit_data = {
.getsda = bit_vooi2c_getsda, .getsda = bit_vooi2c_getsda,
.getscl = bit_vooi2c_getscl, .getscl = bit_vooi2c_getscl,
.udelay = CYCLE_DELAY, .udelay = CYCLE_DELAY,
.mdelay = CYCLE_DELAY,
.timeout = TIMEOUT .timeout = TIMEOUT
}; };
...@@ -177,7 +176,6 @@ static struct i2c_algo_bit_data voo_ddc_bit_data = { ...@@ -177,7 +176,6 @@ static struct i2c_algo_bit_data voo_ddc_bit_data = {
.getsda = bit_vooddc_getsda, .getsda = bit_vooddc_getsda,
.getscl = bit_vooddc_getscl, .getscl = bit_vooddc_getscl,
.udelay = CYCLE_DELAY, .udelay = CYCLE_DELAY,
.mdelay = CYCLE_DELAY,
.timeout = TIMEOUT .timeout = TIMEOUT
}; };
......
...@@ -71,12 +71,12 @@ static int scx200_i2c_getsda(void *data) ...@@ -71,12 +71,12 @@ static int scx200_i2c_getsda(void *data)
*/ */
static struct i2c_algo_bit_data scx200_i2c_data = { static struct i2c_algo_bit_data scx200_i2c_data = {
NULL, .setsda = scx200_i2c_setsda,
scx200_i2c_setsda, .setscl = scx200_i2c_setscl,
scx200_i2c_setscl, .getsda = scx200_i2c_getsda,
scx200_i2c_getsda, .getscl = scx200_i2c_getscl,
scx200_i2c_getscl, .udelay = 10,
10, 10, 100, /* waits, timeout */ .timeout = 100,
}; };
static struct i2c_adapter scx200_i2c_ops = { static struct i2c_adapter scx200_i2c_ops = {
......
...@@ -137,7 +137,6 @@ static struct i2c_algo_bit_data bit_data = { ...@@ -137,7 +137,6 @@ static struct i2c_algo_bit_data bit_data = {
.getsda = bit_getsda, .getsda = bit_getsda,
.getscl = bit_getscl, .getscl = bit_getscl,
.udelay = 5, .udelay = 5,
.mdelay = 5,
.timeout = 100, .timeout = 100,
}; };
......
...@@ -100,7 +100,6 @@ static struct i2c_algo_bit_data bttv_i2c_algo_bit_template = { ...@@ -100,7 +100,6 @@ static struct i2c_algo_bit_data bttv_i2c_algo_bit_template = {
.getsda = bttv_bit_getsda, .getsda = bttv_bit_getsda,
.getscl = bttv_bit_getscl, .getscl = bttv_bit_getscl,
.udelay = 16, .udelay = 16,
.mdelay = 10,
.timeout = 200, .timeout = 200,
}; };
......
...@@ -155,7 +155,6 @@ static struct i2c_algo_bit_data cx8800_i2c_algo_template = { ...@@ -155,7 +155,6 @@ static struct i2c_algo_bit_data cx8800_i2c_algo_template = {
.getsda = cx8800_bit_getsda, .getsda = cx8800_bit_getsda,
.getscl = cx8800_bit_getscl, .getscl = cx8800_bit_getscl,
.udelay = 16, .udelay = 16,
.mdelay = 10,
.timeout = 200, .timeout = 200,
}; };
......
...@@ -100,7 +100,6 @@ static struct i2c_algo_bit_data vp3054_i2c_algo_template = { ...@@ -100,7 +100,6 @@ static struct i2c_algo_bit_data vp3054_i2c_algo_template = {
.getsda = vp3054_bit_getsda, .getsda = vp3054_bit_getsda,
.getscl = vp3054_bit_getscl, .getscl = vp3054_bit_getscl,
.udelay = 16, .udelay = 16,
.mdelay = 10,
.timeout = 200, .timeout = 200,
}; };
......
...@@ -820,7 +820,6 @@ static struct i2c_algo_bit_data zoran_i2c_bit_data_template = { ...@@ -820,7 +820,6 @@ static struct i2c_algo_bit_data zoran_i2c_bit_data_template = {
.getsda = zoran_i2c_getsda, .getsda = zoran_i2c_getsda,
.getscl = zoran_i2c_getscl, .getscl = zoran_i2c_getscl,
.udelay = 10, .udelay = 10,
.mdelay = 0,
.timeout = 100, .timeout = 100,
}; };
......
...@@ -98,7 +98,6 @@ static int i810_setup_i2c_bus(struct i810fb_i2c_chan *chan, const char *name) ...@@ -98,7 +98,6 @@ static int i810_setup_i2c_bus(struct i810fb_i2c_chan *chan, const char *name)
chan->algo.getsda = i810i2c_getsda; chan->algo.getsda = i810i2c_getsda;
chan->algo.getscl = i810i2c_getscl; chan->algo.getscl = i810i2c_getscl;
chan->algo.udelay = 10; chan->algo.udelay = 10;
chan->algo.mdelay = 10;
chan->algo.timeout = (HZ/2); chan->algo.timeout = (HZ/2);
chan->algo.data = chan; chan->algo.data = chan;
......
...@@ -100,7 +100,6 @@ static struct i2c_algo_bit_data matrox_i2c_algo_template = ...@@ -100,7 +100,6 @@ static struct i2c_algo_bit_data matrox_i2c_algo_template =
.getsda = matroxfb_gpio_getsda, .getsda = matroxfb_gpio_getsda,
.getscl = matroxfb_gpio_getscl, .getscl = matroxfb_gpio_getscl,
.udelay = 10, .udelay = 10,
.mdelay = 10,
.timeout = 100, .timeout = 100,
}; };
......
...@@ -148,7 +148,6 @@ static int savage_setup_i2c_bus(struct savagefb_i2c_chan *chan, ...@@ -148,7 +148,6 @@ static int savage_setup_i2c_bus(struct savagefb_i2c_chan *chan,
chan->adapter.algo_data = &chan->algo; chan->adapter.algo_data = &chan->algo;
chan->adapter.dev.parent = &chan->par->pcidev->dev; chan->adapter.dev.parent = &chan->par->pcidev->dev;
chan->algo.udelay = 40; chan->algo.udelay = 40;
chan->algo.mdelay = 5;
chan->algo.timeout = 20; chan->algo.timeout = 20;
chan->algo.data = chan; chan->algo.data = chan;
......
...@@ -40,7 +40,6 @@ struct i2c_algo_bit_data { ...@@ -40,7 +40,6 @@ struct i2c_algo_bit_data {
/* local settings */ /* local settings */
int udelay; /* half-clock-cycle time in microsecs */ int udelay; /* half-clock-cycle time in microsecs */
/* i.e. clock is (500 / udelay) KHz */ /* i.e. clock is (500 / udelay) KHz */
int mdelay; /* in millisecs, unused */
int timeout; /* in jiffies */ int timeout; /* in jiffies */
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册