i2c: remove unused interface function that peripheral_interface_i2c_set_address() 77/159977/3
authorSegwon <segwon.han@samsung.com>
Tue, 14 Nov 2017 04:24:37 +0000 (13:24 +0900)
committerSegwon Han <segwon.han@samsung.com>
Tue, 14 Nov 2017 08:30:14 +0000 (08:30 +0000)
Change-Id: I277e99134c27a411614aac9502c700ab83f04c3e
Signed-off-by: Segwon <segwon.han@samsung.com>
include/interface/peripheral_interface_i2c.h
src/interface/peripheral_interface_i2c.c

index 67c701946c5d5ea0a8ac84fa1c88d9e2f3fe387c..41326d6999a52c2b59bfe1fdf5c06fabe93919a4 100644 (file)
@@ -58,7 +58,6 @@ struct i2c_smbus_ioctl_data {
 };
 
 int peripheral_interface_i2c_close(peripheral_i2c_h i2c);
-int peripheral_interface_i2c_set_address(peripheral_i2c_h i2c, int address);
 int peripheral_interface_i2c_read(peripheral_i2c_h i2c, uint8_t *data, uint32_t length);
 int peripheral_interface_i2c_write(peripheral_i2c_h i2c, uint8_t *data, uint32_t length);
 int peripheral_interface_i2c_smbus_ioctl(peripheral_i2c_h i2c, struct i2c_smbus_ioctl_data *data);
index cc703fece1fc820d1e2fc6313dd4f6bfb9ab0862..6b235ff0d19926e6c9675ae891254ab8f47a4bf6 100644 (file)
@@ -46,24 +46,6 @@ int peripheral_interface_i2c_close(peripheral_i2c_h i2c)
        return 0;
 }
 
-int peripheral_interface_i2c_set_address(peripheral_i2c_h i2c, int address)
-{
-       int status;
-
-       _D("fd : %d, slave address : 0x%x", i2c->fd, address);
-       RETVM_IF(i2c->fd < 0, -EINVAL, "Invalid fd");
-
-       status = ioctl(i2c->fd, I2C_SLAVE, address);
-       if (status < 0) {
-               char errmsg[MAX_ERR_LEN];
-               strerror_r(errno, errmsg, MAX_ERR_LEN);
-               _E("Failed to set slave address(%x), fd : %d, errmsg : %s", address, i2c->fd, errmsg);
-               return status;
-       }
-
-       return 0;
-}
-
 int peripheral_interface_i2c_read(peripheral_i2c_h i2c, uint8_t *data, uint32_t length)
 {
        int status;