include: sbi_utils: Remove driver pointer from struct i2c_adapter

The "driver" pointer in struct i2c_adapter is not used anywhere
so let us remove it.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Xiang W <wxjstz@126.com>
This commit is contained in:
Anup Patel 2023-07-21 13:39:43 +05:30 committed by Anup Patel
parent 5e20d25f19
commit 44c5151293
3 changed files with 0 additions and 9 deletions

View file

@ -15,9 +15,6 @@
/** Representation of a I2C adapter */
struct i2c_adapter {
/** Pointer to I2C driver owning this I2C adapter */
void *driver;
/** Unique ID of the I2C adapter assigned by the driver */
int id;

View file

@ -15,8 +15,6 @@
#include <sbi_utils/i2c/dw_i2c.h>
#include <sbi_utils/i2c/fdt_i2c.h>
extern struct fdt_i2c_adapter fdt_i2c_adapter_dw;
static int fdt_dw_i2c_init(void *fdt, int nodeoff,
const struct fdt_match *match)
{
@ -35,7 +33,6 @@ static int fdt_dw_i2c_init(void *fdt, int nodeoff,
}
adapter->addr = addr;
adapter->adapter.driver = &fdt_i2c_adapter_dw;
rc = dw_i2c_init(&adapter->adapter, nodeoff);
if (rc) {

View file

@ -46,8 +46,6 @@ struct sifive_i2c_adapter {
struct i2c_adapter adapter;
};
extern struct fdt_i2c_adapter fdt_i2c_adapter_sifive;
static inline void sifive_i2c_setreg(struct sifive_i2c_adapter *adap,
uint8_t reg, uint8_t value)
{
@ -250,7 +248,6 @@ static int sifive_i2c_init(void *fdt, int nodeoff,
}
adapter->addr = addr;
adapter->adapter.driver = &fdt_i2c_adapter_sifive;
adapter->adapter.id = nodeoff;
adapter->adapter.write = sifive_i2c_adapter_write;
adapter->adapter.read = sifive_i2c_adapter_read;