Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wolfram Sang and committed by
Richard Weinberger
75203121 f3d45ac2

+1 -2
+1 -2
drivers/mtd/maps/pismo.c
··· 211 211 static int pismo_probe(struct i2c_client *client, 212 212 const struct i2c_device_id *id) 213 213 { 214 - struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); 215 214 struct pismo_pdata *pdata = client->dev.platform_data; 216 215 struct pismo_eeprom eeprom; 217 216 struct pismo_data *pismo; 218 217 int ret, i; 219 218 220 - if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) { 219 + if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { 221 220 dev_err(&client->dev, "functionality mismatch\n"); 222 221 return -EIO; 223 222 }