mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 02:04:05 +08:00
mtd: pismo: Simplify getting the adapter of a client
We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
f3d45ac21e
commit
752031210c
@ -211,13 +211,12 @@ static int pismo_remove(struct i2c_client *client)
|
||||
static int pismo_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *id)
|
||||
{
|
||||
struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
|
||||
struct pismo_pdata *pdata = client->dev.platform_data;
|
||||
struct pismo_eeprom eeprom;
|
||||
struct pismo_data *pismo;
|
||||
int ret, i;
|
||||
|
||||
if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) {
|
||||
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
|
||||
dev_err(&client->dev, "functionality mismatch\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user