Skip to content

Commit

Permalink
i2c-dev: Delete empty detach_client callback
Browse files Browse the repository at this point in the history
Implementing detach_client is optional, so there is no point in
an empty implementation.

Likewise, i2c driver IDs are optional, and we don't need one.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Jul 14, 2008
1 parent 954a993 commit f6a7110
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
7 changes: 0 additions & 7 deletions drivers/i2c/i2c-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,19 +548,12 @@ static int i2cdev_detach_adapter(struct i2c_adapter *adap)
return 0;
}

static int i2cdev_detach_client(struct i2c_client *client)
{
return 0;
}

static struct i2c_driver i2cdev_driver = {
.driver = {
.name = "dev_driver",
},
.id = I2C_DRIVERID_I2CDEV,
.attach_adapter = i2cdev_attach_adapter,
.detach_adapter = i2cdev_detach_adapter,
.detach_client = i2cdev_detach_client,
};

/* ------------------------------------------------------------------------- */
Expand Down
2 changes: 0 additions & 2 deletions include/linux/i2c-id.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@
#define I2C_DRIVERID_M52790 95 /* Mitsubishi M52790SP/FP AV switch */
#define I2C_DRIVERID_CS5345 96 /* cs5345 audio processor */

#define I2C_DRIVERID_I2CDEV 900

#define I2C_DRIVERID_OV7670 1048 /* Omnivision 7670 camera */

/*
Expand Down

0 comments on commit f6a7110

Please sign in to comment.