Skip to content

Commit

Permalink
i2c: Remove NOP i2c_algorithm.algo_control() methods
Browse files Browse the repository at this point in the history
This removes NOP implementations of i2c_algorithm.algo_control.

With this change, there are no implementations of this hook in
the kernel.org tree ... that hook seems about ripe to remove.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
  • Loading branch information
David Brownell authored and Jean Delvare committed Oct 13, 2007
1 parent e265cfa commit 3be27d3
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 56 deletions.
8 changes: 0 additions & 8 deletions drivers/i2c/busses/i2c-iop3xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,6 @@ iop3xx_i2c_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs,
return im;
}

static int
iop3xx_i2c_algo_control(struct i2c_adapter *adapter, unsigned int cmd,
unsigned long arg)
{
return 0;
}

static u32
iop3xx_i2c_func(struct i2c_adapter *adap)
{
Expand All @@ -404,7 +397,6 @@ iop3xx_i2c_func(struct i2c_adapter *adap)

static const struct i2c_algorithm iop3xx_i2c_algo = {
.master_xfer = iop3xx_i2c_master_xfer,
.algo_control = iop3xx_i2c_algo_control,
.functionality = iop3xx_i2c_func,
};

Expand Down
7 changes: 0 additions & 7 deletions drivers/media/video/bt8xx/bttv-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,6 @@ static struct i2c_adapter bttv_i2c_adap_sw_template = {
/* ----------------------------------------------------------------------- */
/* I2C functions - hardware i2c */

static int algo_control(struct i2c_adapter *adapter,
unsigned int cmd, unsigned long arg)
{
return 0;
}

static u32 functionality(struct i2c_adapter *adap)
{
return I2C_FUNC_SMBUS_EMUL;
Expand Down Expand Up @@ -278,7 +272,6 @@ static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int

static struct i2c_algorithm bttv_algo = {
.master_xfer = bttv_i2c_xfer,
.algo_control = algo_control,
.functionality = functionality,
};

Expand Down
10 changes: 0 additions & 10 deletions drivers/media/video/em28xx/em28xx-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,15 +382,6 @@ static int em28xx_i2c_eeprom(struct em28xx *dev, unsigned char *eedata, int len)

/* ----------------------------------------------------------- */

/*
* algo_control()
*/
static int algo_control(struct i2c_adapter *adapter,
unsigned int cmd, unsigned long arg)
{
return 0;
}

/*
* functionality()
*/
Expand Down Expand Up @@ -475,7 +466,6 @@ static int attach_inform(struct i2c_client *client)

static struct i2c_algorithm em28xx_algo = {
.master_xfer = em28xx_i2c_xfer,
.algo_control = algo_control,
.functionality = functionality,
};

Expand Down
7 changes: 0 additions & 7 deletions drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,12 +520,6 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap,
return ret;
}

static int pvr2_i2c_control(struct i2c_adapter *adapter,
unsigned int cmd, unsigned long arg)
{
return 0;
}

static u32 pvr2_i2c_functionality(struct i2c_adapter *adap)
{
return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_I2C;
Expand Down Expand Up @@ -942,7 +936,6 @@ static int pvr2_i2c_detach_inform(struct i2c_client *client)

static struct i2c_algorithm pvr2_i2c_algo_template = {
.master_xfer = pvr2_i2c_xfer,
.algo_control = pvr2_i2c_control,
.functionality = pvr2_i2c_functionality,
};

Expand Down
7 changes: 0 additions & 7 deletions drivers/media/video/saa7134/saa7134-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,6 @@ static int saa7134_i2c_xfer(struct i2c_adapter *i2c_adap,

/* ----------------------------------------------------------- */

static int algo_control(struct i2c_adapter *adapter,
unsigned int cmd, unsigned long arg)
{
return 0;
}

static u32 functionality(struct i2c_adapter *adap)
{
return I2C_FUNC_SMBUS_EMUL;
Expand Down Expand Up @@ -387,7 +381,6 @@ static int attach_inform(struct i2c_client *client)

static struct i2c_algorithm saa7134_algo = {
.master_xfer = saa7134_i2c_xfer,
.algo_control = algo_control,
.functionality = functionality,
};

Expand Down
6 changes: 0 additions & 6 deletions drivers/media/video/usbvision/usbvision-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,6 @@ usbvision_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num)
return num;
}

static int algo_control(struct i2c_adapter *adapter, unsigned int cmd, unsigned long arg)
{
return 0;
}

static u32 functionality(struct i2c_adapter *adap)
{
return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR;
Expand All @@ -199,7 +194,6 @@ static u32 functionality(struct i2c_adapter *adap)
static struct i2c_algorithm usbvision_algo = {
.master_xfer = usbvision_i2c_xfer,
.smbus_xfer = NULL,
.algo_control = algo_control,
.functionality = functionality,
};

Expand Down
11 changes: 0 additions & 11 deletions drivers/media/video/w9968cf.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,6 @@ static int w9968cf_i2c_smbus_xfer(struct i2c_adapter*, u16 addr,
static u32 w9968cf_i2c_func(struct i2c_adapter*);
static int w9968cf_i2c_attach_inform(struct i2c_client*);
static int w9968cf_i2c_detach_inform(struct i2c_client*);
static int w9968cf_i2c_control(struct i2c_adapter*, unsigned int cmd,
unsigned long arg);

/* Memory management */
static void* rvmalloc(unsigned long size);
Expand Down Expand Up @@ -1543,21 +1541,12 @@ static int w9968cf_i2c_detach_inform(struct i2c_client* client)
}


static int
w9968cf_i2c_control(struct i2c_adapter* adapter, unsigned int cmd,
unsigned long arg)
{
return 0;
}


static int w9968cf_i2c_init(struct w9968cf_device* cam)
{
int err = 0;

static struct i2c_algorithm algo = {
.smbus_xfer = w9968cf_i2c_smbus_xfer,
.algo_control = w9968cf_i2c_control,
.functionality = w9968cf_i2c_func,
};

Expand Down

0 comments on commit 3be27d3

Please sign in to comment.