mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +01:00
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:
@@ -15,9 +15,6 @@
|
|||||||
|
|
||||||
/** Representation of a I2C adapter */
|
/** Representation of a I2C adapter */
|
||||||
struct 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 */
|
/** Unique ID of the I2C adapter assigned by the driver */
|
||||||
int id;
|
int id;
|
||||||
|
|
||||||
|
@@ -15,8 +15,6 @@
|
|||||||
#include <sbi_utils/i2c/dw_i2c.h>
|
#include <sbi_utils/i2c/dw_i2c.h>
|
||||||
#include <sbi_utils/i2c/fdt_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,
|
static int fdt_dw_i2c_init(void *fdt, int nodeoff,
|
||||||
const struct fdt_match *match)
|
const struct fdt_match *match)
|
||||||
{
|
{
|
||||||
@@ -35,7 +33,6 @@ static int fdt_dw_i2c_init(void *fdt, int nodeoff,
|
|||||||
}
|
}
|
||||||
|
|
||||||
adapter->addr = addr;
|
adapter->addr = addr;
|
||||||
adapter->adapter.driver = &fdt_i2c_adapter_dw;
|
|
||||||
|
|
||||||
rc = dw_i2c_init(&adapter->adapter, nodeoff);
|
rc = dw_i2c_init(&adapter->adapter, nodeoff);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
|
@@ -46,8 +46,6 @@ struct sifive_i2c_adapter {
|
|||||||
struct i2c_adapter 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,
|
static inline void sifive_i2c_setreg(struct sifive_i2c_adapter *adap,
|
||||||
uint8_t reg, uint8_t value)
|
uint8_t reg, uint8_t value)
|
||||||
{
|
{
|
||||||
@@ -250,7 +248,6 @@ static int sifive_i2c_init(void *fdt, int nodeoff,
|
|||||||
}
|
}
|
||||||
|
|
||||||
adapter->addr = addr;
|
adapter->addr = addr;
|
||||||
adapter->adapter.driver = &fdt_i2c_adapter_sifive;
|
|
||||||
adapter->adapter.id = nodeoff;
|
adapter->adapter.id = nodeoff;
|
||||||
adapter->adapter.write = sifive_i2c_adapter_write;
|
adapter->adapter.write = sifive_i2c_adapter_write;
|
||||||
adapter->adapter.read = sifive_i2c_adapter_read;
|
adapter->adapter.read = sifive_i2c_adapter_read;
|
||||||
|
Reference in New Issue
Block a user