hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/mtd/maps/pismo.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * PISMO memory driver - http://www.pismoworld.org/
34 *
45 * For ARM Realview and Versatile platforms
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License.
96 */
107 #include <linux/init.h>
118 #include <linux/module.h>
....@@ -214,13 +211,12 @@
214211 static int pismo_probe(struct i2c_client *client,
215212 const struct i2c_device_id *id)
216213 {
217
- struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
218214 struct pismo_pdata *pdata = client->dev.platform_data;
219215 struct pismo_eeprom eeprom;
220216 struct pismo_data *pismo;
221217 int ret, i;
222218
223
- if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) {
219
+ if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
224220 dev_err(&client->dev, "functionality mismatch\n");
225221 return -EIO;
226222 }