hwmon: use simple i2c probe function
authorStephen Kitt <steve@sk2.org>
Thu, 13 Aug 2020 16:02:22 +0000 (18:02 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 23 Sep 2020 16:42:39 +0000 (09:42 -0700)
Many hwmon drivers don't use the id information provided by the old
i2c probe function, and the remainder can easily be adapted to the new
form ("probe_new") by calling i2c_match_id explicitly.

This avoids scanning the identifier tables during probes.

Drivers which didn't use the id are converted as-is; drivers which did
are modified as follows:

* if the information in i2c_client is sufficient, that's used instead
  (client->name);
* anything else is handled by calling i2c_match_id() with the same
  level of error-handling (if any) as before.

A few drivers aren't included in this patch because they have a
different set of maintainers. They will be covered by other patches.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20200813160222.1503401-1-steve@sk2.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
87 files changed:
drivers/hwmon/ad7414.c
drivers/hwmon/ad7418.c
drivers/hwmon/adm1021.c
drivers/hwmon/adm1025.c
drivers/hwmon/adm1026.c
drivers/hwmon/adm1031.c
drivers/hwmon/adm9240.c
drivers/hwmon/adt7410.c
drivers/hwmon/adt7411.c
drivers/hwmon/adt7462.c
drivers/hwmon/adt7470.c
drivers/hwmon/adt7475.c
drivers/hwmon/amc6821.c
drivers/hwmon/asb100.c
drivers/hwmon/atxp1.c
drivers/hwmon/ds1621.c
drivers/hwmon/ds620.c
drivers/hwmon/emc1403.c
drivers/hwmon/emc6w201.c
drivers/hwmon/fschmd.c
drivers/hwmon/ftsteutates.c
drivers/hwmon/g760a.c
drivers/hwmon/g762.c
drivers/hwmon/gl518sm.c
drivers/hwmon/gl520sm.c
drivers/hwmon/hih6130.c
drivers/hwmon/ina209.c
drivers/hwmon/ina2xx.c
drivers/hwmon/ina3221.c
drivers/hwmon/jc42.c
drivers/hwmon/lineage-pem.c
drivers/hwmon/lm63.c
drivers/hwmon/lm75.c
drivers/hwmon/lm77.c
drivers/hwmon/lm78.c
drivers/hwmon/lm80.c
drivers/hwmon/lm83.c
drivers/hwmon/lm85.c
drivers/hwmon/lm90.c
drivers/hwmon/lm92.c
drivers/hwmon/lm93.c
drivers/hwmon/lm95234.c
drivers/hwmon/lm95241.c
drivers/hwmon/lm95245.c
drivers/hwmon/ltc2945.c
drivers/hwmon/ltc2990.c
drivers/hwmon/ltc4151.c
drivers/hwmon/ltc4215.c
drivers/hwmon/ltc4222.c
drivers/hwmon/ltc4245.c
drivers/hwmon/ltc4260.c
drivers/hwmon/ltc4261.c
drivers/hwmon/max16065.c
drivers/hwmon/max1619.c
drivers/hwmon/max1668.c
drivers/hwmon/max31730.c
drivers/hwmon/max31790.c
drivers/hwmon/max6621.c
drivers/hwmon/max6639.c
drivers/hwmon/max6642.c
drivers/hwmon/max6650.c
drivers/hwmon/max6697.c
drivers/hwmon/mcp3021.c
drivers/hwmon/nct7802.c
drivers/hwmon/nct7904.c
drivers/hwmon/occ/p8_i2c.c
drivers/hwmon/pcf8591.c
drivers/hwmon/powr1220.c
drivers/hwmon/sht21.c
drivers/hwmon/sht3x.c
drivers/hwmon/shtc1.c
drivers/hwmon/smm665.c
drivers/hwmon/smsc47m192.c
drivers/hwmon/stts751.c
drivers/hwmon/tc654.c
drivers/hwmon/tc74.c
drivers/hwmon/thmc50.c
drivers/hwmon/tmp102.c
drivers/hwmon/tmp103.c
drivers/hwmon/tmp108.c
drivers/hwmon/tmp401.c
drivers/hwmon/tmp421.c
drivers/hwmon/w83773g.c
drivers/hwmon/w83781d.c
drivers/hwmon/w83792d.c
drivers/hwmon/w83l785ts.c
drivers/hwmon/w83l786ng.c

index a529f2efc79017e9db5d4747620e6b08b42e50e6..6a765755d0616510af9ff9285a8eefb47d5151f4 100644 (file)
@@ -169,8 +169,7 @@ static struct attribute *ad7414_attrs[] = {
 
 ATTRIBUTE_GROUPS(ad7414);
 
-static int ad7414_probe(struct i2c_client *client,
-                       const struct i2c_device_id *dev_id)
+static int ad7414_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct ad7414_data *data;
@@ -222,7 +221,7 @@ static struct i2c_driver ad7414_driver = {
                .name   = "ad7414",
                .of_match_table = of_match_ptr(ad7414_of_match),
        },
-       .probe  = ad7414_probe,
+       .probe_new = ad7414_probe,
        .id_table = ad7414_id,
 };
 
index 74542b8ad8ef7fde71e389c9e37c0a44e054acea..d618f6b2f3820b1fd57ba2855c5d800b181b09a7 100644 (file)
@@ -230,8 +230,9 @@ static void ad7418_init_client(struct i2c_client *client)
        }
 }
 
-static int ad7418_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static const struct i2c_device_id ad7418_id[];
+
+static int ad7418_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct i2c_adapter *adapter = client->adapter;
@@ -254,7 +255,7 @@ static int ad7418_probe(struct i2c_client *client,
        if (dev->of_node)
                data->type = (enum chips)of_device_get_match_data(dev);
        else
-               data->type = id->driver_data;
+               data->type = i2c_match_id(ad7418_id, client)->driver_data;
 
        switch (data->type) {
        case ad7416:
@@ -305,7 +306,7 @@ static struct i2c_driver ad7418_driver = {
                .name   = "ad7418",
                .of_match_table = ad7418_dt_ids,
        },
-       .probe          = ad7418_probe,
+       .probe_new      = ad7418_probe,
        .id_table       = ad7418_id,
 };
 
index c45046241a1c5cef94d9681f2ded643317d09ed5..71deb2cd20f558678acb850fc021d80cf831d6d6 100644 (file)
@@ -425,8 +425,9 @@ static void adm1021_init_client(struct i2c_client *client)
        i2c_smbus_write_byte_data(client, ADM1021_REG_CONV_RATE_W, 0x04);
 }
 
-static int adm1021_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static const struct i2c_device_id adm1021_id[];
+
+static int adm1021_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct adm1021_data *data;
@@ -437,7 +438,7 @@ static int adm1021_probe(struct i2c_client *client,
                return -ENOMEM;
 
        data->client = client;
-       data->type = id->driver_data;
+       data->type = i2c_match_id(adm1021_id, client)->driver_data;
        mutex_init(&data->update_lock);
 
        /* Initialize the ADM1021 chip */
@@ -472,7 +473,7 @@ static struct i2c_driver adm1021_driver = {
        .driver = {
                .name   = "adm1021",
        },
-       .probe          = adm1021_probe,
+       .probe_new      = adm1021_probe,
        .id_table       = adm1021_id,
        .detect         = adm1021_detect,
        .address_list   = normal_i2c,
index ed15185fa60f80526abdbedfebd58b933e5602f8..de51e01c061bae74744b2cccc2227320c2c849c2 100644 (file)
@@ -517,8 +517,7 @@ static void adm1025_init_client(struct i2c_client *client)
                                          (reg&0x7E)|0x01);
 }
 
-static int adm1025_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int adm1025_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -560,7 +559,7 @@ static struct i2c_driver adm1025_driver = {
        .driver = {
                .name   = "adm1025",
        },
-       .probe          = adm1025_probe,
+       .probe_new      = adm1025_probe,
        .id_table       = adm1025_id,
        .detect         = adm1025_detect,
        .address_list   = normal_i2c,
index af77096724fd93c40cc732657892e9fcc97db277..49cefbadb156a1dcf8984459372089ba8eecfc27 100644 (file)
@@ -1816,8 +1816,7 @@ static void adm1026_init_client(struct i2c_client *client)
        }
 }
 
-static int adm1026_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int adm1026_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -1860,7 +1859,7 @@ static struct i2c_driver adm1026_driver = {
        .driver = {
                .name   = "adm1026",
        },
-       .probe          = adm1026_probe,
+       .probe_new      = adm1026_probe,
        .id_table       = adm1026_id,
        .detect         = adm1026_detect,
        .address_list   = normal_i2c,
index 7723a338446d52c99bb6d2cbdf0f36d723836ca8..b538ace2d2924da6e77d51484fbbded84af16666 100644 (file)
@@ -1022,8 +1022,9 @@ static void adm1031_init_client(struct i2c_client *client)
        data->update_interval = update_intervals[i];
 }
 
-static int adm1031_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static const struct i2c_device_id adm1031_id[];
+
+static int adm1031_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -1035,7 +1036,7 @@ static int adm1031_probe(struct i2c_client *client,
 
        i2c_set_clientdata(client, data);
        data->client = client;
-       data->chip_type = id->driver_data;
+       data->chip_type = i2c_match_id(adm1031_id, client)->driver_data;
        mutex_init(&data->update_lock);
 
        if (data->chip_type == adm1030)
@@ -1068,7 +1069,7 @@ static struct i2c_driver adm1031_driver = {
        .driver = {
                .name = "adm1031",
        },
-       .probe          = adm1031_probe,
+       .probe_new      = adm1031_probe,
        .id_table       = adm1031_id,
        .detect         = adm1031_detect,
        .address_list   = normal_i2c,
index 496d47490e1070bbca3e20f6e373d21d9d0d0aa6..16364dee1794de75c04069c506b622c7cc356aa7 100644 (file)
@@ -704,8 +704,7 @@ static void adm9240_init_client(struct i2c_client *client)
        }
 }
 
-static int adm9240_probe(struct i2c_client *new_client,
-                        const struct i2c_device_id *id)
+static int adm9240_probe(struct i2c_client *new_client)
 {
        struct device *dev = &new_client->dev;
        struct device *hwmon_dev;
@@ -741,7 +740,7 @@ static struct i2c_driver adm9240_driver = {
        .driver = {
                .name   = "adm9240",
        },
-       .probe          = adm9240_probe,
+       .probe_new      = adm9240_probe,
        .id_table       = adm9240_id,
        .detect         = adm9240_detect,
        .address_list   = normal_i2c,
index 80f8a46733157e278aef85b8862ce9b168c42640..9d80895d0266e808bfe262285a8393af978bdfec 100644 (file)
@@ -39,8 +39,7 @@ static const struct adt7x10_ops adt7410_i2c_ops = {
        .write_byte = adt7410_i2c_write_byte,
 };
 
-static int adt7410_i2c_probe(struct i2c_client *client,
-       const struct i2c_device_id *id)
+static int adt7410_i2c_probe(struct i2c_client *client)
 {
        if (!i2c_check_functionality(client->adapter,
                        I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA))
@@ -67,7 +66,7 @@ static struct i2c_driver adt7410_driver = {
                .name   = "adt7410",
                .pm     = ADT7X10_DEV_PM_OPS,
        },
-       .probe          = adt7410_i2c_probe,
+       .probe_new      = adt7410_i2c_probe,
        .remove         = adt7410_i2c_remove,
        .id_table       = adt7410_ids,
        .address_list   = I2C_ADDRS(0x48, 0x49, 0x4a, 0x4b),
index 5a839cc2ed1c3ae8861acb17e589d9d31d3476ab..fad74aa62b642ddc0bd9d2d723383363f282370b 100644 (file)
@@ -666,8 +666,7 @@ static const struct hwmon_chip_info adt7411_chip_info = {
        .info = adt7411_info,
 };
 
-static int adt7411_probe(struct i2c_client *client,
-                                  const struct i2c_device_id *id)
+static int adt7411_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct adt7411_data *data;
@@ -707,7 +706,7 @@ static struct i2c_driver adt7411_driver = {
        .driver         = {
                .name           = "adt7411",
        },
-       .probe  = adt7411_probe,
+       .probe_new = adt7411_probe,
        .id_table = adt7411_id,
        .detect = adt7411_detect,
        .address_list = normal_i2c,
index 208813158bb405539044480fe13c921d0247be1d..e75bbd87ad0933bb35575d48db18924b76f0e75a 100644 (file)
@@ -1787,8 +1787,7 @@ static int adt7462_detect(struct i2c_client *client,
        return 0;
 }
 
-static int adt7462_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int adt7462_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct adt7462_data *data;
@@ -1820,7 +1819,7 @@ static struct i2c_driver adt7462_driver = {
        .driver = {
                .name   = "adt7462",
        },
-       .probe          = adt7462_probe,
+       .probe_new      = adt7462_probe,
        .id_table       = adt7462_id,
        .detect         = adt7462_detect,
        .address_list   = normal_i2c,
index a30f34cf512c2b96a2064f2fca92581fae4a01b3..740f39a54ab0875248de6c571de8f78f83430d9e 100644 (file)
@@ -1217,8 +1217,7 @@ static void adt7470_init_client(struct i2c_client *client)
        }
 }
 
-static int adt7470_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int adt7470_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct adt7470_data *data;
@@ -1276,7 +1275,7 @@ static struct i2c_driver adt7470_driver = {
        .driver = {
                .name   = "adt7470",
        },
-       .probe          = adt7470_probe,
+       .probe_new      = adt7470_probe,
        .remove         = adt7470_remove,
        .id_table       = adt7470_id,
        .detect         = adt7470_detect,
index 054080443b477ec0147c58e527a8a8f07e816145..9d5b019651f2d715189caaf7ca447e5c9e0321c5 100644 (file)
@@ -1539,8 +1539,7 @@ static int adt7475_set_pwm_polarity(struct i2c_client *client)
        return 0;
 }
 
-static int adt7475_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int adt7475_probe(struct i2c_client *client)
 {
        enum chips chip;
        static const char * const names[] = {
@@ -1554,6 +1553,7 @@ static int adt7475_probe(struct i2c_client *client,
        struct device *hwmon_dev;
        int i, ret = 0, revision, group_num = 0;
        u8 config3;
+       const struct i2c_device_id *id = i2c_match_id(adt7475_id, client);
 
        data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL);
        if (data == NULL)
@@ -1728,7 +1728,7 @@ static struct i2c_driver adt7475_driver = {
                .name   = "adt7475",
                .of_match_table = of_match_ptr(adt7475_of_match),
        },
-       .probe          = adt7475_probe,
+       .probe_new      = adt7475_probe,
        .id_table       = adt7475_id,
        .detect         = adt7475_detect,
        .address_list   = normal_i2c,
index 013fb056b1d026b5ff8c776a1e9aeef1d6127478..6b1ce2242c6187619e49c4cff77c8f5779c88a83 100644 (file)
@@ -900,8 +900,7 @@ static int amc6821_init_client(struct i2c_client *client)
        return 0;
 }
 
-static int amc6821_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int amc6821_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct amc6821_data *data;
@@ -940,7 +939,7 @@ static struct i2c_driver amc6821_driver = {
        .driver = {
                .name   = "amc6821",
        },
-       .probe = amc6821_probe,
+       .probe_new = amc6821_probe,
        .id_table = amc6821_id,
        .detect = amc6821_detect,
        .address_list = normal_i2c,
index 4c609e23a4efb93d683bcefbd6e78b4ab53ea0ea..ba9fcf6f9264c949b0bbb07c01385a1f23a61cb9 100644 (file)
@@ -205,8 +205,7 @@ struct asb100_data {
 static int asb100_read_value(struct i2c_client *client, u16 reg);
 static void asb100_write_value(struct i2c_client *client, u16 reg, u16 val);
 
-static int asb100_probe(struct i2c_client *client,
-                       const struct i2c_device_id *id);
+static int asb100_probe(struct i2c_client *client);
 static int asb100_detect(struct i2c_client *client,
                         struct i2c_board_info *info);
 static int asb100_remove(struct i2c_client *client);
@@ -224,7 +223,7 @@ static struct i2c_driver asb100_driver = {
        .driver = {
                .name   = "asb100",
        },
-       .probe          = asb100_probe,
+       .probe_new      = asb100_probe,
        .remove         = asb100_remove,
        .id_table       = asb100_id,
        .detect         = asb100_detect,
@@ -775,8 +774,7 @@ static int asb100_detect(struct i2c_client *client,
        return 0;
 }
 
-static int asb100_probe(struct i2c_client *client,
-                       const struct i2c_device_id *id)
+static int asb100_probe(struct i2c_client *client)
 {
        int err;
        struct asb100_data *data;
index 79b8df25837127d6a6eec37410a36aba75460b3d..1e08a5431f128183b29f4ae5eec3fd8302602468 100644 (file)
@@ -244,8 +244,7 @@ static struct attribute *atxp1_attrs[] = {
 };
 ATTRIBUTE_GROUPS(atxp1);
 
-static int atxp1_probe(struct i2c_client *client,
-                      const struct i2c_device_id *id)
+static int atxp1_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct atxp1_data *data;
@@ -288,7 +287,7 @@ static struct i2c_driver atxp1_driver = {
        .driver = {
                .name   = "atxp1",
        },
-       .probe          = atxp1_probe,
+       .probe_new      = atxp1_probe,
        .id_table       = atxp1_id,
 };
 
index 541bed8732b720ee9d2a17c5bf87f79eb457acf1..e1d742bfc74c97978cf02a0c2523568e37da1998 100644 (file)
@@ -342,8 +342,9 @@ static const struct attribute_group ds1621_group = {
 };
 __ATTRIBUTE_GROUPS(ds1621);
 
-static int ds1621_probe(struct i2c_client *client,
-                       const struct i2c_device_id *id)
+static const struct i2c_device_id ds1621_id[];
+
+static int ds1621_probe(struct i2c_client *client)
 {
        struct ds1621_data *data;
        struct device *hwmon_dev;
@@ -355,7 +356,7 @@ static int ds1621_probe(struct i2c_client *client,
 
        mutex_init(&data->update_lock);
 
-       data->kind = id->driver_data;
+       data->kind = i2c_match_id(ds1621_id, client)->driver_data;
        data->client = client;
 
        /* Initialize the DS1621 chip */
@@ -383,7 +384,7 @@ static struct i2c_driver ds1621_driver = {
        .driver = {
                .name   = "ds1621",
        },
-       .probe          = ds1621_probe,
+       .probe_new      = ds1621_probe,
        .id_table       = ds1621_id,
 };
 
index 8f1fc83ac37bfe73442d6f697b0cf1e3808d9882..9ec722798c4a8504eb0189b76f04a398a286919c 100644 (file)
@@ -211,8 +211,7 @@ static struct attribute *ds620_attrs[] = {
 
 ATTRIBUTE_GROUPS(ds620);
 
-static int ds620_probe(struct i2c_client *client,
-                      const struct i2c_device_id *id)
+static int ds620_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -246,7 +245,7 @@ static struct i2c_driver ds620_driver = {
        .driver = {
                   .name = "ds620",
        },
-       .probe = ds620_probe,
+       .probe_new = ds620_probe,
        .id_table = ds620_id,
 };
 
index e9c0bbc2caa95636411a069c2debbca451656bad..314838272049940109a9fed32f69aa9e4517795b 100644 (file)
@@ -386,11 +386,13 @@ static const struct regmap_config emc1403_regmap_config = {
        .volatile_reg = emc1403_regmap_is_volatile,
 };
 
-static int emc1403_probe(struct i2c_client *client,
-                       const struct i2c_device_id *id)
+static const struct i2c_device_id emc1403_idtable[];
+
+static int emc1403_probe(struct i2c_client *client)
 {
        struct thermal_data *data;
        struct device *hwmon_dev;
+       const struct i2c_device_id *id = i2c_match_id(emc1403_idtable, client);
 
        data = devm_kzalloc(&client->dev, sizeof(struct thermal_data),
                            GFP_KERNEL);
@@ -452,7 +454,7 @@ static struct i2c_driver sensor_emc1403 = {
                .name = "emc1403",
        },
        .detect = emc1403_detect,
-       .probe = emc1403_probe,
+       .probe_new = emc1403_probe,
        .id_table = emc1403_idtable,
        .address_list = emc1403_address_list,
 };
index df0f7292e21442baeec35b368756a46a8d9fc6d2..ec5c98702bf547dab43229e5a7e89c12e6408ee6 100644 (file)
@@ -444,8 +444,7 @@ static int emc6w201_detect(struct i2c_client *client,
        return 0;
 }
 
-static int emc6w201_probe(struct i2c_client *client,
-                         const struct i2c_device_id *id)
+static int emc6w201_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct emc6w201_data *data;
@@ -475,7 +474,7 @@ static struct i2c_driver emc6w201_driver = {
        .driver = {
                .name   = "emc6w201",
        },
-       .probe          = emc6w201_probe,
+       .probe_new      = emc6w201_probe,
        .id_table       = emc6w201_id,
        .detect         = emc6w201_detect,
        .address_list   = normal_i2c,
index 4136643d8e0cde96d8792fa862395e0bece26aaf..5191cd85a8d13cacd1f26c5c593810acbe2f5c71 100644 (file)
@@ -214,8 +214,7 @@ static const int FSCHMD_NO_TEMP_SENSORS[7] = { 3, 3, 4, 3, 5, 5, 11 };
  * Functions declarations
  */
 
-static int fschmd_probe(struct i2c_client *client,
-                       const struct i2c_device_id *id);
+static int fschmd_probe(struct i2c_client *client);
 static int fschmd_detect(struct i2c_client *client,
                         struct i2c_board_info *info);
 static int fschmd_remove(struct i2c_client *client);
@@ -242,7 +241,7 @@ static struct i2c_driver fschmd_driver = {
        .driver = {
                .name   = "fschmd",
        },
-       .probe          = fschmd_probe,
+       .probe_new      = fschmd_probe,
        .remove         = fschmd_remove,
        .id_table       = fschmd_id,
        .detect         = fschmd_detect,
@@ -1081,15 +1080,14 @@ static int fschmd_detect(struct i2c_client *client,
        return 0;
 }
 
-static int fschmd_probe(struct i2c_client *client,
-                       const struct i2c_device_id *id)
+static int fschmd_probe(struct i2c_client *client)
 {
        struct fschmd_data *data;
        const char * const names[7] = { "Poseidon", "Hermes", "Scylla",
                                "Heracles", "Heimdall", "Hades", "Syleus" };
        const int watchdog_minors[] = { WATCHDOG_MINOR, 212, 213, 214, 215 };
        int i, err;
-       enum chips kind = id->driver_data;
+       enum chips kind = i2c_match_id(fschmd_id, client)->driver_data;
 
        data = kzalloc(sizeof(struct fschmd_data), GFP_KERNEL);
        if (!data)
index 371ce7745f5e8fbddf54bfb01caaf716e8cc14ba..ef88a156efc2f862ff0f483c949c40ce68d4187f 100644 (file)
@@ -752,7 +752,7 @@ static int fts_remove(struct i2c_client *client)
        return 0;
 }
 
-static int fts_probe(struct i2c_client *client, const struct i2c_device_id *id)
+static int fts_probe(struct i2c_client *client)
 {
        u8 revision;
        struct fts_data *data;
@@ -819,7 +819,7 @@ static struct i2c_driver fts_driver = {
                .name = "ftsteutates",
        },
        .id_table = fts_id,
-       .probe = fts_probe,
+       .probe_new = fts_probe,
        .remove = fts_remove,
        .detect = fts_detect,
        .address_list = normal_i2c,
index 31beedcb420fb5475c5cc727836a1318878e6eee..a692f7b2f6f7dfbcf15f318c18020cad462231e0 100644 (file)
@@ -170,8 +170,7 @@ ATTRIBUTE_GROUPS(g760a);
  * new-style driver model code
  */
 
-static int g760a_probe(struct i2c_client *client,
-                       const struct i2c_device_id *id)
+static int g760a_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct g760a_data *data;
@@ -207,7 +206,7 @@ static struct i2c_driver g760a_driver = {
        .driver = {
                .name   = "g760a",
        },
-       .probe    = g760a_probe,
+       .probe_new = g760a_probe,
        .id_table = g760a_id,
 };
 
index 5f0f346315801baa6a4c890417bb45bdb13c2c01..64a0599b2da5c40c1a32bd1fd7df54c680dc1a27 100644 (file)
@@ -1033,7 +1033,7 @@ static inline int g762_fan_init(struct device *dev)
                                         data->fan_cmd1);
 }
 
-static int g762_probe(struct i2c_client *client, const struct i2c_device_id *id)
+static int g762_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -1079,7 +1079,7 @@ static struct i2c_driver g762_driver = {
                .name = DRVNAME,
                .of_match_table = of_match_ptr(g762_dt_match),
        },
-       .probe    = g762_probe,
+       .probe_new = g762_probe,
        .id_table = g762_id,
 };
 
index 4964beeea54213ffa2f6d5627a525ef473b884df..7aaee5a48243baa93e025615a5dc415936bf65ab 100644 (file)
@@ -611,8 +611,7 @@ static void gl518_init_client(struct i2c_client *client)
        gl518_write_value(client, GL518_REG_CONF, 0x40 | regvalue);
 }
 
-static int gl518_probe(struct i2c_client *client,
-                      const struct i2c_device_id *id)
+static int gl518_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -653,7 +652,7 @@ static struct i2c_driver gl518_driver = {
        .driver = {
                .name   = "gl518sm",
        },
-       .probe          = gl518_probe,
+       .probe_new      = gl518_probe,
        .id_table       = gl518_id,
        .detect         = gl518_detect,
        .address_list   = normal_i2c,
index 4689e01cb56d737ec3a2fd41896a42ec5830b1ac..4ae1295cc3ea7a2b354d081182af4d1bc3be018e 100644 (file)
@@ -854,8 +854,7 @@ static void gl520_init_client(struct i2c_client *client)
        gl520_write_value(client, GL520_REG_BEEP_MASK, data->beep_mask);
 }
 
-static int gl520_probe(struct i2c_client *client,
-                      const struct i2c_device_id *id)
+static int gl520_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -896,7 +895,7 @@ static struct i2c_driver gl520_driver = {
        .driver = {
                .name   = "gl520sm",
        },
-       .probe          = gl520_probe,
+       .probe_new      = gl520_probe,
        .id_table       = gl520_id,
        .detect         = gl520_detect,
        .address_list   = normal_i2c,
index 018df6074f7b21b1c3cfab2688d403d45c9a2d9c..d9394e19fea801feebcc331cf3e0cf51b1f26700 100644 (file)
@@ -204,8 +204,7 @@ static struct attribute *hih6130_attrs[] = {
 
 ATTRIBUTE_GROUPS(hih6130);
 
-static int hih6130_probe(struct i2c_client *client,
-                                  const struct i2c_device_id *id)
+static int hih6130_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct hih6130 *hih6130;
@@ -250,7 +249,7 @@ static struct i2c_driver hih6130_driver = {
                .name = "hih6130",
                .of_match_table = of_match_ptr(hih6130_of_match),
        },
-       .probe       = hih6130_probe,
+       .probe_new   = hih6130_probe,
        .id_table    = hih6130_id,
 };
 
index 08ee3a64a0261ed25848314a454a427d3e4b72d5..f4c7b5f7635908d3fbc6e0dc2bd162abbbcca6fd 100644 (file)
@@ -531,8 +531,7 @@ static int ina209_init_client(struct i2c_client *client,
        return 0;
 }
 
-static int ina209_probe(struct i2c_client *client,
-                       const struct i2c_device_id *id)
+static int ina209_probe(struct i2c_client *client)
 {
        struct i2c_adapter *adapter = client->adapter;
        struct ina209_data *data;
@@ -597,7 +596,7 @@ static struct i2c_driver ina209_driver = {
                .name   = "ina209",
                .of_match_table = of_match_ptr(ina209_of_match),
        },
-       .probe          = ina209_probe,
+       .probe_new      = ina209_probe,
        .remove         = ina209_remove,
        .id_table       = ina209_id,
 };
index 0fc6d58579931972b365ccdb3f2bcaf8216b5f08..ca97f9e931bc0232445c0c14216756e615d12d98 100644 (file)
@@ -614,8 +614,9 @@ static const struct attribute_group ina226_group = {
        .attrs = ina226_attrs,
 };
 
-static int ina2xx_probe(struct i2c_client *client,
-                       const struct i2c_device_id *id)
+static const struct i2c_device_id ina2xx_id[];
+
+static int ina2xx_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct ina2xx_data *data;
@@ -627,7 +628,7 @@ static int ina2xx_probe(struct i2c_client *client,
        if (client->dev.of_node)
                chip = (enum ina2xx_ids)of_device_get_match_data(&client->dev);
        else
-               chip = id->driver_data;
+               chip = i2c_match_id(ina2xx_id, client)->driver_data;
 
        data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
        if (!data)
@@ -717,7 +718,7 @@ static struct i2c_driver ina2xx_driver = {
                .name   = "ina2xx",
                .of_match_table = of_match_ptr(ina2xx_of_match),
        },
-       .probe          = ina2xx_probe,
+       .probe_new      = ina2xx_probe,
        .id_table       = ina2xx_id,
 };
 
index 81e155692aba57631fc2f26a7584908156681a18..41fb17e0d6416bbcd8fb2561cbdf7fc9f2c84490 100644 (file)
@@ -822,8 +822,7 @@ static int ina3221_probe_from_dt(struct device *dev, struct ina3221_data *ina)
        return 0;
 }
 
-static int ina3221_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int ina3221_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct ina3221_data *ina;
@@ -1016,7 +1015,7 @@ static const struct i2c_device_id ina3221_ids[] = {
 MODULE_DEVICE_TABLE(i2c, ina3221_ids);
 
 static struct i2c_driver ina3221_i2c_driver = {
-       .probe = ina3221_probe,
+       .probe_new = ina3221_probe,
        .remove = ina3221_remove,
        .driver = {
                .name = INA3221_DRIVER_NAME,
index e3f1ebee71306b6ee12f69a7ebf318027df7ef38..4a03d010ec5a8bfd6ba1c4f92d30e717cbc03c63 100644 (file)
@@ -458,7 +458,7 @@ static const struct hwmon_chip_info jc42_chip_info = {
        .info = jc42_info,
 };
 
-static int jc42_probe(struct i2c_client *client, const struct i2c_device_id *id)
+static int jc42_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -581,7 +581,7 @@ static struct i2c_driver jc42_driver = {
                .pm = JC42_DEV_PM_OPS,
                .of_match_table = of_match_ptr(jc42_of_ids),
        },
-       .probe          = jc42_probe,
+       .probe_new      = jc42_probe,
        .remove         = jc42_remove,
        .id_table       = jc42_id,
        .detect         = jc42_detect,
index ce5b0598524cbf02ac398de8f34baa11f631b793..c83eb2fd80eb346f43984a72a9ff2b534eb4cba1 100644 (file)
@@ -417,8 +417,7 @@ static const struct attribute_group pem_fan_group = {
        .attrs = pem_fan_attributes,
 };
 
-static int pem_probe(struct i2c_client *client,
-                    const struct i2c_device_id *id)
+static int pem_probe(struct i2c_client *client)
 {
        struct i2c_adapter *adapter = client->adapter;
        struct device *dev = &client->dev;
@@ -512,7 +511,7 @@ static struct i2c_driver pem_driver = {
        .driver = {
                   .name = "lineage_pem",
                   },
-       .probe = pem_probe,
+       .probe_new = pem_probe,
        .id_table = pem_id,
 };
 
index 60a817f58db9f9c5cdf2d27596bc1b74b0a20d29..50f67265c71d879a043854e9b83d40cd1e365b83 100644 (file)
@@ -1087,8 +1087,9 @@ static void lm63_init_client(struct lm63_data *data)
                (data->config_fan & 0x20) ? "manual" : "auto");
 }
 
-static int lm63_probe(struct i2c_client *client,
-                     const struct i2c_device_id *id)
+static const struct i2c_device_id lm63_id[];
+
+static int lm63_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -1106,7 +1107,7 @@ static int lm63_probe(struct i2c_client *client,
        if (client->dev.of_node)
                data->kind = (enum chips)of_device_get_match_data(&client->dev);
        else
-               data->kind = id->driver_data;
+               data->kind = i2c_match_id(lm63_id, client)->driver_data;
        if (data->kind == lm64)
                data->temp2_offset = 16000;
 
@@ -1163,7 +1164,7 @@ static struct i2c_driver lm63_driver = {
                .name   = "lm63",
                .of_match_table = of_match_ptr(lm63_of_match),
        },
-       .probe          = lm63_probe,
+       .probe_new      = lm63_probe,
        .id_table       = lm63_id,
        .detect         = lm63_detect,
        .address_list   = normal_i2c,
index ba0be48aeadddb6e1741953a5bfc8a83228c7d5c..e22f977942b47cef65e04b0019decb1e46cef82c 100644 (file)
@@ -542,8 +542,9 @@ static void lm75_remove(void *data)
        i2c_smbus_write_byte_data(client, LM75_REG_CONF, lm75->orig_conf);
 }
 
-static int
-lm75_probe(struct i2c_client *client, const struct i2c_device_id *id)
+static const struct i2c_device_id lm75_ids[];
+
+static int lm75_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -554,7 +555,7 @@ lm75_probe(struct i2c_client *client, const struct i2c_device_id *id)
        if (client->dev.of_node)
                kind = (enum lm75_type)of_device_get_match_data(&client->dev);
        else
-               kind = id->driver_data;
+               kind = i2c_match_id(lm75_ids, client)->driver_data;
 
        if (!i2c_check_functionality(client->adapter,
                        I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA))
@@ -893,7 +894,7 @@ static struct i2c_driver lm75_driver = {
                .of_match_table = of_match_ptr(lm75_of_match),
                .pm     = LM75_DEV_PM_OPS,
        },
-       .probe          = lm75_probe,
+       .probe_new      = lm75_probe,
        .id_table       = lm75_ids,
        .detect         = lm75_detect,
        .address_list   = normal_i2c,
index 671a962fde2934c66fb5e2d471377b8f31f8bdc9..7570c9d50ddcaeb2fb8677b170a654015814aac1 100644 (file)
@@ -315,7 +315,7 @@ static void lm77_init_client(struct i2c_client *client)
                lm77_write_value(client, LM77_REG_CONF, conf & 0xfe);
 }
 
-static int lm77_probe(struct i2c_client *client, const struct i2c_device_id *id)
+static int lm77_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -348,7 +348,7 @@ static struct i2c_driver lm77_driver = {
        .driver = {
                .name   = "lm77",
        },
-       .probe          = lm77_probe,
+       .probe_new      = lm77_probe,
        .id_table       = lm77_id,
        .detect         = lm77_detect,
        .address_list   = normal_i2c,
index 2119461ec43a0576bed563d4116f45f33cb6c8f4..1aa35ca0c6fed7340578820bdeb0691a2f2b63e5 100644 (file)
@@ -627,8 +627,9 @@ static int lm78_i2c_detect(struct i2c_client *client,
        return -ENODEV;
 }
 
-static int lm78_i2c_probe(struct i2c_client *client,
-                         const struct i2c_device_id *id)
+static const struct i2c_device_id lm78_i2c_id[];
+
+static int lm78_i2c_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -639,7 +640,7 @@ static int lm78_i2c_probe(struct i2c_client *client,
                return -ENOMEM;
 
        data->client = client;
-       data->type = id->driver_data;
+       data->type = i2c_match_id(lm78_i2c_id, client)->driver_data;
 
        /* Initialize the LM78 chip */
        lm78_init_device(data);
@@ -661,7 +662,7 @@ static struct i2c_driver lm78_driver = {
        .driver = {
                .name   = "lm78",
        },
-       .probe          = lm78_i2c_probe,
+       .probe_new      = lm78_i2c_probe,
        .id_table       = lm78_i2c_id,
        .detect         = lm78_i2c_detect,
        .address_list   = normal_i2c,
index 80520cef76173e7923468453b3b1046eeda86a53..ac4adb44b224d783d44f51b2ecc2a4bffc7ab8c2 100644 (file)
@@ -591,8 +591,7 @@ static int lm80_detect(struct i2c_client *client, struct i2c_board_info *info)
        return 0;
 }
 
-static int lm80_probe(struct i2c_client *client,
-                     const struct i2c_device_id *id)
+static int lm80_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -641,7 +640,7 @@ static struct i2c_driver lm80_driver = {
        .driver = {
                .name   = "lm80",
        },
-       .probe          = lm80_probe,
+       .probe_new      = lm80_probe,
        .id_table       = lm80_id,
        .detect         = lm80_detect,
        .address_list   = normal_i2c,
index 8fefca9bbbb78b7e5f4e805d8e9f49dd065c95ff..2ff5ecce608e3ea9f4e269b6989b28d06a327a01 100644 (file)
@@ -317,8 +317,9 @@ static int lm83_detect(struct i2c_client *new_client,
        return 0;
 }
 
-static int lm83_probe(struct i2c_client *new_client,
-                     const struct i2c_device_id *id)
+static const struct i2c_device_id lm83_id[];
+
+static int lm83_probe(struct i2c_client *new_client)
 {
        struct device *hwmon_dev;
        struct lm83_data *data;
@@ -338,7 +339,7 @@ static int lm83_probe(struct i2c_client *new_client,
         * declare 1 and 3 common, and then 2 and 4 only for the LM83.
         */
        data->groups[0] = &lm83_group;
-       if (id->driver_data == lm83)
+       if (i2c_match_id(lm83_id, new_client)->driver_data == lm83)
                data->groups[1] = &lm83_group_opt;
 
        hwmon_dev = devm_hwmon_device_register_with_groups(&new_client->dev,
@@ -363,7 +364,7 @@ static struct i2c_driver lm83_driver = {
        .driver = {
                .name   = "lm83",
        },
-       .probe          = lm83_probe,
+       .probe_new      = lm83_probe,
        .id_table       = lm83_id,
        .detect         = lm83_detect,
        .address_list   = normal_i2c,
index cff0aa505a7840cc9cf80d5622c89ef1f54de6aa..c7bf5de7b70f05c4e27190aaf75dbada38d75152 100644 (file)
@@ -1544,7 +1544,9 @@ static int lm85_detect(struct i2c_client *client, struct i2c_board_info *info)
        return 0;
 }
 
-static int lm85_probe(struct i2c_client *client, const struct i2c_device_id *id)
+static const struct i2c_device_id lm85_id[];
+
+static int lm85_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -1559,7 +1561,7 @@ static int lm85_probe(struct i2c_client *client, const struct i2c_device_id *id)
        if (client->dev.of_node)
                data->type = (enum chips)of_device_get_match_data(&client->dev);
        else
-               data->type = id->driver_data;
+               data->type = i2c_match_id(lm85_id, client)->driver_data;
        mutex_init(&data->update_lock);
 
        /* Fill in the chip specific driver values */
@@ -1696,7 +1698,7 @@ static struct i2c_driver lm85_driver = {
                .name   = "lm85",
                .of_match_table = of_match_ptr(lm85_of_match),
        },
-       .probe          = lm85_probe,
+       .probe_new      = lm85_probe,
        .id_table       = lm85_id,
        .detect         = lm85_detect,
        .address_list   = normal_i2c,
index 7bdc664af55b52ed4b78d14e1ab81934dabe8c9c..ebbfd5f352c064eeb3cf071691c13919aaee8ec8 100644 (file)
@@ -1779,8 +1779,7 @@ static const struct hwmon_ops lm90_ops = {
        .write = lm90_write,
 };
 
-static int lm90_probe(struct i2c_client *client,
-                     const struct i2c_device_id *id)
+static int lm90_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct i2c_adapter *adapter = client->adapter;
@@ -1816,7 +1815,7 @@ static int lm90_probe(struct i2c_client *client,
        if (client->dev.of_node)
                data->kind = (enum chips)of_device_get_match_data(&client->dev);
        else
-               data->kind = id->driver_data;
+               data->kind = i2c_match_id(lm90_id, client)->driver_data;
        if (data->kind == adm1032) {
                if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE))
                        client->flags &= ~I2C_CLIENT_PEC;
@@ -1952,7 +1951,7 @@ static struct i2c_driver lm90_driver = {
                .name   = "lm90",
                .of_match_table = of_match_ptr(lm90_of_match),
        },
-       .probe          = lm90_probe,
+       .probe_new      = lm90_probe,
        .alert          = lm90_alert,
        .id_table       = lm90_id,
        .detect         = lm90_detect,
index 84347db5edf31d513ae7e4d36376752b3b53225b..9bf278cf0bd03b705d1236c11a33fa2167891673 100644 (file)
@@ -292,8 +292,7 @@ static int lm92_detect(struct i2c_client *new_client,
        return 0;
 }
 
-static int lm92_probe(struct i2c_client *new_client,
-                     const struct i2c_device_id *id)
+static int lm92_probe(struct i2c_client *new_client)
 {
        struct device *hwmon_dev;
        struct lm92_data *data;
@@ -331,7 +330,7 @@ static struct i2c_driver lm92_driver = {
        .driver = {
                .name   = "lm92",
        },
-       .probe          = lm92_probe,
+       .probe_new      = lm92_probe,
        .id_table       = lm92_id,
        .detect         = lm92_detect,
        .address_list   = normal_i2c,
index cea8ea32327132e16e53b3a02512569e2e3d2850..78d6dfaf145b0cc5ad3ccc1a8774e4bb7bed6fdf 100644 (file)
@@ -2583,8 +2583,7 @@ static int lm93_detect(struct i2c_client *client, struct i2c_board_info *info)
        return 0;
 }
 
-static int lm93_probe(struct i2c_client *client,
-                     const struct i2c_device_id *id)
+static int lm93_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct lm93_data *data;
@@ -2636,7 +2635,7 @@ static struct i2c_driver lm93_driver = {
        .driver = {
                .name   = "lm93",
        },
-       .probe          = lm93_probe,
+       .probe_new      = lm93_probe,
        .id_table       = lm93_id,
        .detect         = lm93_detect,
        .address_list   = normal_i2c,
index 8a2a2a49049699560df6913b3005d27d3c10c9fd..ac169a994ae007d3fc1b433af72de5ce9ac0be7e 100644 (file)
@@ -677,8 +677,9 @@ static int lm95234_init_client(struct i2c_client *client)
        return 0;
 }
 
-static int lm95234_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static const struct i2c_device_id lm95234_id[];
+
+static int lm95234_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct lm95234_data *data;
@@ -698,7 +699,7 @@ static int lm95234_probe(struct i2c_client *client,
                return err;
 
        data->groups[0] = &lm95234_common_group;
-       if (id->driver_data == lm95234)
+       if (i2c_match_id(lm95234_id, client)->driver_data == lm95234)
                data->groups[1] = &lm95234_group;
 
        hwmon_dev = devm_hwmon_device_register_with_groups(dev, client->name,
@@ -719,7 +720,7 @@ static struct i2c_driver lm95234_driver = {
        .driver = {
                .name   = DRVNAME,
        },
-       .probe          = lm95234_probe,
+       .probe_new      = lm95234_probe,
        .id_table       = lm95234_id,
        .detect         = lm95234_detect,
        .address_list   = normal_i2c,
index 8d66d6e3c0fc6f23240734b7a69b645320cfd7ab..00dbc170c8c6b7b3b1db428a14e486088bcb2136 100644 (file)
@@ -432,8 +432,7 @@ static const struct hwmon_chip_info lm95241_chip_info = {
        .info = lm95241_info,
 };
 
-static int lm95241_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int lm95241_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct lm95241_data *data;
@@ -469,7 +468,7 @@ static struct i2c_driver lm95241_driver = {
        .driver = {
                .name   = DEVNAME,
        },
-       .probe          = lm95241_probe,
+       .probe_new      = lm95241_probe,
        .id_table       = lm95241_id,
        .detect         = lm95241_detect,
        .address_list   = normal_i2c,
index 057614e664e130857db25fefe1fe35acaa75cf82..29388fcf5f74d64617acaeb649dbe42a98e59af9 100644 (file)
@@ -547,8 +547,7 @@ static const struct hwmon_chip_info lm95245_chip_info = {
        .info = lm95245_info,
 };
 
-static int lm95245_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int lm95245_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct lm95245_data *data;
@@ -598,7 +597,7 @@ static struct i2c_driver lm95245_driver = {
                .name   = "lm95245",
                .of_match_table = of_match_ptr(lm95245_of_match),
        },
-       .probe          = lm95245_probe,
+       .probe_new      = lm95245_probe,
        .id_table       = lm95245_id,
        .detect         = lm95245_detect,
        .address_list   = normal_i2c,
index 2818276ed3d6b347e87d7178f098dcc5760d1ff6..ba9c868a8641e5c363ec121d47d3eb6f68b569d1 100644 (file)
@@ -445,8 +445,7 @@ static const struct regmap_config ltc2945_regmap_config = {
        .max_register = LTC2945_MIN_ADIN_THRES_L,
 };
 
-static int ltc2945_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int ltc2945_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -478,7 +477,7 @@ static struct i2c_driver ltc2945_driver = {
        .driver = {
                   .name = "ltc2945",
                   },
-       .probe = ltc2945_probe,
+       .probe_new = ltc2945_probe,
        .id_table = ltc2945_id,
 };
 
index 53ff5051774ccc5e1a3254105da6499b1b69fed4..78b191b26bb2b8eccd504748b29897069907ea38 100644 (file)
@@ -200,8 +200,7 @@ static const struct attribute_group ltc2990_group = {
 };
 __ATTRIBUTE_GROUPS(ltc2990);
 
-static int ltc2990_i2c_probe(struct i2c_client *i2c,
-                            const struct i2c_device_id *id)
+static int ltc2990_i2c_probe(struct i2c_client *i2c)
 {
        int ret;
        struct device *hwmon_dev;
@@ -269,7 +268,7 @@ static struct i2c_driver ltc2990_i2c_driver = {
        .driver = {
                .name = "ltc2990",
        },
-       .probe    = ltc2990_i2c_probe,
+       .probe_new = ltc2990_i2c_probe,
        .id_table = ltc2990_i2c_id,
 };
 
index 67a529b7ba18c082db39901a459ab96974e370e2..321f54e237bdfb97eec7fed562a84ab159dc2369 100644 (file)
@@ -154,8 +154,7 @@ static struct attribute *ltc4151_attrs[] = {
 };
 ATTRIBUTE_GROUPS(ltc4151);
 
-static int ltc4151_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int ltc4151_probe(struct i2c_client *client)
 {
        struct i2c_adapter *adapter = client->adapter;
        struct device *dev = &client->dev;
@@ -206,7 +205,7 @@ static struct i2c_driver ltc4151_driver = {
                .name   = "ltc4151",
                .of_match_table = of_match_ptr(ltc4151_match),
        },
-       .probe          = ltc4151_probe,
+       .probe_new      = ltc4151_probe,
        .id_table       = ltc4151_id,
 };
 
index f783ac19675e8c433e7d07ce7789e67213835287..7cef3cb2962b90d5cfa257b3b2bbcbd8cf901224 100644 (file)
@@ -218,8 +218,7 @@ static struct attribute *ltc4215_attrs[] = {
 };
 ATTRIBUTE_GROUPS(ltc4215);
 
-static int ltc4215_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int ltc4215_probe(struct i2c_client *client)
 {
        struct i2c_adapter *adapter = client->adapter;
        struct device *dev = &client->dev;
@@ -256,7 +255,7 @@ static struct i2c_driver ltc4215_driver = {
        .driver = {
                .name   = "ltc4215",
        },
-       .probe          = ltc4215_probe,
+       .probe_new      = ltc4215_probe,
        .id_table       = ltc4215_id,
 };
 
index d15485e93fb8b2a64822937bd4b2ce6ab8a5841d..3efce6d1cb884c1dd6c0b028b9cd94812c8dc4bc 100644 (file)
@@ -177,8 +177,7 @@ static const struct regmap_config ltc4222_regmap_config = {
        .max_register = LTC4222_ADC_CONTROL,
 };
 
-static int ltc4222_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int ltc4222_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -211,7 +210,7 @@ static struct i2c_driver ltc4222_driver = {
        .driver = {
                   .name = "ltc4222",
                   },
-       .probe = ltc4222_probe,
+       .probe_new = ltc4222_probe,
        .id_table = ltc4222_id,
 };
 
index 244a83d675cd68fe17ed846d88df640284431b12..5088d28b3a7c3081a91d2ec69a7523ebfe192136 100644 (file)
@@ -440,8 +440,7 @@ static bool ltc4245_use_extra_gpios(struct i2c_client *client)
        return false;
 }
 
-static int ltc4245_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int ltc4245_probe(struct i2c_client *client)
 {
        struct i2c_adapter *adapter = client->adapter;
        struct ltc4245_data *data;
@@ -480,7 +479,7 @@ static struct i2c_driver ltc4245_driver = {
        .driver = {
                .name   = "ltc4245",
        },
-       .probe          = ltc4245_probe,
+       .probe_new      = ltc4245_probe,
        .id_table       = ltc4245_id,
 };
 
index 8b8fd4a313eeec06d88443cd99eb0be16de895c5..d0beb43abf3f4a5c34945f26582730234fde68ac 100644 (file)
@@ -141,8 +141,7 @@ static const struct regmap_config ltc4260_regmap_config = {
        .max_register = LTC4260_ADIN,
 };
 
-static int ltc4260_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int ltc4260_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -174,7 +173,7 @@ static struct i2c_driver ltc4260_driver = {
        .driver = {
                   .name = "ltc4260",
                   },
-       .probe = ltc4260_probe,
+       .probe_new = ltc4260_probe,
        .id_table = ltc4260_id,
 };
 
index c415829ffbf573eccf4218089c3a6333fb71a46a..1dab84b52df578371d3bcdb24c04553a4b3f3180 100644 (file)
@@ -190,8 +190,7 @@ static struct attribute *ltc4261_attrs[] = {
 };
 ATTRIBUTE_GROUPS(ltc4261);
 
-static int ltc4261_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int ltc4261_probe(struct i2c_client *client)
 {
        struct i2c_adapter *adapter = client->adapter;
        struct device *dev = &client->dev;
@@ -234,7 +233,7 @@ static struct i2c_driver ltc4261_driver = {
        .driver = {
                   .name = "ltc4261",
                   },
-       .probe = ltc4261_probe,
+       .probe_new = ltc4261_probe,
        .id_table = ltc4261_id,
 };
 
index 49b7e0b6d1bbe909d83ce8a0664662eaa07fae5d..a26226e7bc374fe3c1f47126c578472f7f621d04 100644 (file)
@@ -493,8 +493,9 @@ static const struct attribute_group max16065_max_group = {
        .is_visible = max16065_secondary_is_visible,
 };
 
-static int max16065_probe(struct i2c_client *client,
-                         const struct i2c_device_id *id)
+static const struct i2c_device_id max16065_id[];
+
+static int max16065_probe(struct i2c_client *client)
 {
        struct i2c_adapter *adapter = client->adapter;
        struct max16065_data *data;
@@ -504,6 +505,7 @@ static int max16065_probe(struct i2c_client *client,
        bool have_secondary;            /* true if chip has secondary limits */
        bool secondary_is_max = false;  /* secondary limits reflect max */
        int groups = 0;
+       const struct i2c_device_id *id = i2c_match_id(max16065_id, client);
 
        if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA
                                     | I2C_FUNC_SMBUS_READ_WORD_DATA))
@@ -598,7 +600,7 @@ static struct i2c_driver max16065_driver = {
        .driver = {
                .name = "max16065",
        },
-       .probe = max16065_probe,
+       .probe_new = max16065_probe,
        .id_table = max16065_id,
 };
 
index 87c6665bab3a0b105a1e1dde35262efa8789e479..8bd941cae4d14650e7725ac8037787de9baf27a2 100644 (file)
@@ -261,8 +261,7 @@ static void max1619_init_client(struct i2c_client *client)
                                          config & 0xBF); /* run */
 }
 
-static int max1619_probe(struct i2c_client *new_client,
-                        const struct i2c_device_id *id)
+static int max1619_probe(struct i2c_client *new_client)
 {
        struct max1619_data *data;
        struct device *hwmon_dev;
@@ -306,7 +305,7 @@ static struct i2c_driver max1619_driver = {
                .name   = "max1619",
                .of_match_table = of_match_ptr(max1619_of_match),
        },
-       .probe          = max1619_probe,
+       .probe_new      = max1619_probe,
        .id_table       = max1619_id,
        .detect         = max1619_detect,
        .address_list   = normal_i2c,
index fb6d1728736543b4222e7b51601ea4fc6b64f8dc..5c41c78f04583516a769023c944f64d3472804e7 100644 (file)
@@ -391,8 +391,9 @@ static int max1668_detect(struct i2c_client *client,
        return 0;
 }
 
-static int max1668_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static const struct i2c_device_id max1668_id[];
+
+static int max1668_probe(struct i2c_client *client)
 {
        struct i2c_adapter *adapter = client->adapter;
        struct device *dev = &client->dev;
@@ -407,7 +408,7 @@ static int max1668_probe(struct i2c_client *client,
                return -ENOMEM;
 
        data->client = client;
-       data->type = id->driver_data;
+       data->type = i2c_match_id(max1668_id, client)->driver_data;
        mutex_init(&data->update_lock);
 
        /* sysfs hooks */
@@ -434,7 +435,7 @@ static struct i2c_driver max1668_driver = {
        .driver = {
                  .name = "max1668",
                  },
-       .probe = max1668_probe,
+       .probe_new = max1668_probe,
        .id_table = max1668_id,
        .detect = max1668_detect,
        .address_list = max1668_addr_list,
index eb22a34dc36ba6419960320e63f2bd7ff84150f8..23598b8b879343e80cd9b098a21fd0420d7dc6c7 100644 (file)
@@ -292,7 +292,7 @@ static void max31730_remove(void *data)
 }
 
 static int
-max31730_probe(struct i2c_client *client, const struct i2c_device_id *id)
+max31730_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -427,7 +427,7 @@ static struct i2c_driver max31730_driver = {
                .of_match_table = of_match_ptr(max31730_of_match),
                .pm     = &max31730_pm_ops,
        },
-       .probe          = max31730_probe,
+       .probe_new      = max31730_probe,
        .id_table       = max31730_ids,
        .detect         = max31730_detect,
        .address_list   = normal_i2c,
index 117fb79ef294cdc1717ac348b1dfcc71ba1eda24..86e6c71db685cd9086597ce38bb799a8f42a5c86 100644 (file)
@@ -448,8 +448,7 @@ static int max31790_init_client(struct i2c_client *client,
        return 0;
 }
 
-static int max31790_probe(struct i2c_client *client,
-                         const struct i2c_device_id *id)
+static int max31790_probe(struct i2c_client *client)
 {
        struct i2c_adapter *adapter = client->adapter;
        struct device *dev = &client->dev;
@@ -491,7 +490,7 @@ MODULE_DEVICE_TABLE(i2c, max31790_id);
 
 static struct i2c_driver max31790_driver = {
        .class          = I2C_CLASS_HWMON,
-       .probe          = max31790_probe,
+       .probe_new      = max31790_probe,
        .driver = {
                .name   = "max31790",
        },
index a8bb5de142307d6f8ffe1d3e70245df975178f21..367855d5edaee36e83b00a8ca7ad6d5aea3fb714 100644 (file)
@@ -477,8 +477,7 @@ static const struct hwmon_chip_info max6621_chip_info = {
        .info = max6621_info,
 };
 
-static int max6621_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int max6621_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct max6621_data *data;
@@ -555,7 +554,7 @@ static struct i2c_driver max6621_driver = {
                .name = MAX6621_DRV_NAME,
                .of_match_table = of_match_ptr(max6621_of_match),
        },
-       .probe          = max6621_probe,
+       .probe_new      = max6621_probe,
        .id_table       = max6621_id,
 };
 
index 2d56e97aa5fa87b3fecde4ff65e0b5ec85f80e5b..b71899c641fa7a4185f5b8367b6e8ead6ce355bc 100644 (file)
@@ -516,8 +516,7 @@ static int max6639_detect(struct i2c_client *client,
        return 0;
 }
 
-static int max6639_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int max6639_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct max6639_data *data;
@@ -581,7 +580,7 @@ static struct i2c_driver max6639_driver = {
                   .name = "max6639",
                   .pm = &max6639_pm_ops,
                   },
-       .probe = max6639_probe,
+       .probe_new = max6639_probe,
        .id_table = max6639_id,
        .detect = max6639_detect,
        .address_list = normal_i2c,
index 5ab6fdb53b9664a32bd0a342beba44cdf5218e62..23d93142b0b3154900464cb30ec4fba819bd7dda 100644 (file)
@@ -264,8 +264,7 @@ static struct attribute *max6642_attrs[] = {
 };
 ATTRIBUTE_GROUPS(max6642);
 
-static int max6642_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int max6642_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct max6642_data *data;
@@ -302,7 +301,7 @@ static struct i2c_driver max6642_driver = {
        .driver = {
                .name   = "max6642",
        },
-       .probe          = max6642_probe,
+       .probe_new      = max6642_probe,
        .id_table       = max6642_id,
        .detect         = max6642_detect,
        .address_list   = normal_i2c,
index 3d9d371c35b5e494c42d9365b32908bb129a26e1..cc7f2980fe83410c9a80a0bb1cb65bf236854b04 100644 (file)
@@ -757,8 +757,9 @@ static const struct hwmon_chip_info max6650_chip_info = {
        .info = max6650_info,
 };
 
-static int max6650_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static const struct i2c_device_id max6650_id[];
+
+static int max6650_probe(struct i2c_client *client)
 {
        struct thermal_cooling_device *cooling_dev;
        struct device *dev = &client->dev;
@@ -775,7 +776,8 @@ static int max6650_probe(struct i2c_client *client,
        data->client = client;
        i2c_set_clientdata(client, data);
        mutex_init(&data->update_lock);
-       data->nr_fans = of_id ? (int)(uintptr_t)of_id->data : id->driver_data;
+       data->nr_fans = of_id ? (int)(uintptr_t)of_id->data :
+                               i2c_match_id(max6650_id, client)->driver_data;
 
        /*
         * Initialize the max6650 chip
@@ -817,7 +819,7 @@ static struct i2c_driver max6650_driver = {
                .name   = "max6650",
                .of_match_table = of_match_ptr(max6650_dt_match),
        },
-       .probe          = max6650_probe,
+       .probe_new      = max6650_probe,
        .id_table       = max6650_id,
 };
 
index 58781d999caa10493b25330a771523c32a328ab6..fc3241101178de729943d29a588451fe339b0e47 100644 (file)
@@ -685,8 +685,9 @@ done:
        return 0;
 }
 
-static int max6697_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static const struct i2c_device_id max6697_id[];
+
+static int max6697_probe(struct i2c_client *client)
 {
        struct i2c_adapter *adapter = client->adapter;
        struct device *dev = &client->dev;
@@ -704,7 +705,7 @@ static int max6697_probe(struct i2c_client *client,
        if (client->dev.of_node)
                data->type = (enum chips)of_device_get_match_data(&client->dev);
        else
-               data->type = id->driver_data;
+               data->type = i2c_match_id(max6697_id, client)->driver_data;
        data->chip = &max6697_chip_data[data->type];
        data->client = client;
        mutex_init(&data->update_lock);
@@ -785,7 +786,7 @@ static struct i2c_driver max6697_driver = {
                .name   = "max6697",
                .of_match_table = of_match_ptr(max6697_of_match),
        },
-       .probe = max6697_probe,
+       .probe_new = max6697_probe,
        .id_table = max6697_id,
 };
 
index 4e8f995dc7738d075d6eafe3e34a225a469e582a..ce2780768074ca5cc6e8530c21c9031dac947df4 100644 (file)
@@ -100,8 +100,9 @@ static ssize_t in0_input_show(struct device *dev,
 
 static DEVICE_ATTR_RO(in0_input);
 
-static int mcp3021_probe(struct i2c_client *client,
-                               const struct i2c_device_id *id)
+static const struct i2c_device_id mcp3021_id[];
+
+static int mcp3021_probe(struct i2c_client *client)
 {
        int err;
        struct mcp3021_data *data = NULL;
@@ -132,7 +133,7 @@ static int mcp3021_probe(struct i2c_client *client,
                        data->vdd = MCP3021_VDD_REF_DEFAULT;
        }
 
-       switch (id->driver_data) {
+       switch (i2c_match_id(mcp3021_id, client)->driver_data) {
        case mcp3021:
                data->sar_shift = MCP3021_SAR_SHIFT;
                data->sar_mask = MCP3021_SAR_MASK;
@@ -197,7 +198,7 @@ static struct i2c_driver mcp3021_driver = {
                .name = "mcp3021",
                .of_match_table = of_match_ptr(of_mcp3021_match),
        },
-       .probe = mcp3021_probe,
+       .probe_new = mcp3021_probe,
        .remove = mcp3021_remove,
        .id_table = mcp3021_id,
 };
index 570df8eb52720090bf0f76ea06ce5dac5d677707..604af2f6103a303ef50eb0ec22dfa3d50db7ced5 100644 (file)
@@ -1056,8 +1056,7 @@ static int nct7802_init_chip(struct nct7802_data *data)
        return regmap_update_bits(data->regmap, REG_VMON_ENABLE, 0x03, 0x03);
 }
 
-static int nct7802_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int nct7802_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct nct7802_data *data;
@@ -1101,7 +1100,7 @@ static struct i2c_driver nct7802_driver = {
                .name = DRVNAME,
        },
        .detect = nct7802_detect,
-       .probe = nct7802_probe,
+       .probe_new = nct7802_probe,
        .id_table = nct7802_idtable,
        .address_list = nct7802_address_list,
 };
index 242ff8bee78dd718405210800e9086c67faac77f..b1c837fc407af9bdb2175fe496b6aa46cea9eca1 100644 (file)
@@ -1009,8 +1009,7 @@ static const struct watchdog_ops nct7904_wdt_ops = {
        .get_timeleft   = nct7904_wdt_get_timeleft,
 };
 
-static int nct7904_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int nct7904_probe(struct i2c_client *client)
 {
        struct nct7904_data *data;
        struct device *hwmon_dev;
@@ -1172,7 +1171,7 @@ static struct i2c_driver nct7904_driver = {
        .driver = {
                .name = "nct7904",
        },
-       .probe = nct7904_probe,
+       .probe_new = nct7904_probe,
        .id_table = nct7904_id,
        .detect = nct7904_detect,
        .address_list = normal_i2c,
index 76fb7870c7d3d504f93168942bfb048752b734c0..0cf8588be35acffe6b0049891b2e7279bb5a583f 100644 (file)
@@ -203,8 +203,7 @@ static int p8_i2c_occ_send_cmd(struct occ *occ, u8 *cmd)
        return 0;
 }
 
-static int p8_i2c_occ_probe(struct i2c_client *client,
-                           const struct i2c_device_id *id)
+static int p8_i2c_occ_probe(struct i2c_client *client)
 {
        struct occ *occ;
        struct p8_i2c_occ *ctx = devm_kzalloc(&client->dev, sizeof(*ctx),
@@ -245,7 +244,7 @@ static struct i2c_driver p8_i2c_occ_driver = {
                .name = "occ-hwmon",
                .of_match_table = p8_i2c_occ_of_match,
        },
-       .probe = p8_i2c_occ_probe,
+       .probe_new = p8_i2c_occ_probe,
        .remove = p8_i2c_occ_remove,
 };
 
index b7a3a292123d1338aec1cfa2c7aef9f449161529..a97a51005c616421072c5fc0dfbbeb1566b73534 100644 (file)
@@ -179,8 +179,7 @@ static const struct attribute_group pcf8591_attr_group_opt = {
  * Real code
  */
 
-static int pcf8591_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int pcf8591_probe(struct i2c_client *client)
 {
        struct pcf8591_data *data;
        int err;
@@ -295,7 +294,7 @@ static struct i2c_driver pcf8591_driver = {
        .driver = {
                .name   = "pcf8591",
        },
-       .probe          = pcf8591_probe,
+       .probe_new      = pcf8591_probe,
        .remove         = pcf8591_remove,
        .id_table       = pcf8591_id,
 };
index a5d1a890d0beefafdb67c32869da5c6abea458e5..9e086338dcbaa54b020fa1f1db7cf80b780119e9 100644 (file)
@@ -297,8 +297,7 @@ static struct attribute *powr1220_attrs[] = {
 
 ATTRIBUTE_GROUPS(powr1220);
 
-static int powr1220_probe(struct i2c_client *client,
-               const struct i2c_device_id *id)
+static int powr1220_probe(struct i2c_client *client)
 {
        struct powr1220_data *data;
        struct device *hwmon_dev;
@@ -331,7 +330,7 @@ static struct i2c_driver powr1220_driver = {
        .driver = {
                .name   = "powr1220",
        },
-       .probe          = powr1220_probe,
+       .probe_new      = powr1220_probe,
        .id_table       = powr1220_ids,
 };
 
index 8ea5534455f2dfaa95e09383deeade7807e4a429..7d18ce5d383973ed9e68f352bec11f286e5db715 100644 (file)
@@ -250,8 +250,7 @@ static struct attribute *sht21_attrs[] = {
 
 ATTRIBUTE_GROUPS(sht21);
 
-static int sht21_probe(struct i2c_client *client,
-       const struct i2c_device_id *id)
+static int sht21_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -286,7 +285,7 @@ MODULE_DEVICE_TABLE(i2c, sht21_id);
 
 static struct i2c_driver sht21_driver = {
        .driver.name = "sht21",
-       .probe       = sht21_probe,
+       .probe_new   = sht21_probe,
        .id_table    = sht21_id,
 };
 
index 7364764baaeb731e9526f92ce2f78ce4fb20a226..3f279aa1cee5ed68a62cdb14fc64a3e9a79e8808 100644 (file)
@@ -662,8 +662,9 @@ static struct attribute *sts3x_attrs[] = {
 ATTRIBUTE_GROUPS(sht3x);
 ATTRIBUTE_GROUPS(sts3x);
 
-static int sht3x_probe(struct i2c_client *client,
-                      const struct i2c_device_id *id)
+static const struct i2c_device_id sht3x_ids[];
+
+static int sht3x_probe(struct i2c_client *client)
 {
        int ret;
        struct sht3x_data *data;
@@ -715,7 +716,7 @@ static int sht3x_probe(struct i2c_client *client,
        if (ret)
                return ret;
 
-       if (id->driver_data == sts3x)
+       if (i2c_match_id(sht3x_ids, client)->driver_data == sts3x)
                attribute_groups = sts3x_groups;
        else
                attribute_groups = sht3x_groups;
@@ -742,7 +743,7 @@ MODULE_DEVICE_TABLE(i2c, sht3x_ids);
 
 static struct i2c_driver sht3x_i2c_driver = {
        .driver.name = "sht3x",
-       .probe       = sht3x_probe,
+       .probe_new   = sht3x_probe,
        .id_table    = sht3x_ids,
 };
 
index a0078ccede03f9302db615deab5e0d65df75fdcc..288fd0b4c4d3594db9beb02ee22568593f056558 100644 (file)
@@ -185,15 +185,16 @@ static void shtc1_select_command(struct shtc1_data *data)
        }
 }
 
-static int shtc1_probe(struct i2c_client *client,
-                      const struct i2c_device_id *id)
+static const struct i2c_device_id shtc1_id[];
+
+static int shtc1_probe(struct i2c_client *client)
 {
        int ret;
        u16 id_reg;
        char id_reg_buf[2];
        struct shtc1_data *data;
        struct device *hwmon_dev;
-       enum shtcx_chips chip = id->driver_data;
+       enum shtcx_chips chip = i2c_match_id(shtc1_id, client)->driver_data;
        struct i2c_adapter *adap = client->adapter;
        struct device *dev = &client->dev;
 
@@ -259,7 +260,7 @@ MODULE_DEVICE_TABLE(i2c, shtc1_id);
 
 static struct i2c_driver shtc1_i2c_driver = {
        .driver.name  = "shtc1",
-       .probe        = shtc1_probe,
+       .probe_new    = shtc1_probe,
        .id_table     = shtc1_id,
 };
 
index af01f763f7d1e364c39a4e3a090019830bc63aca..b6cbe9810a1bc955f4869efce9614e132a8ffad6 100644 (file)
@@ -562,8 +562,9 @@ static struct attribute *smm665_attrs[] = {
 
 ATTRIBUTE_GROUPS(smm665);
 
-static int smm665_probe(struct i2c_client *client,
-                       const struct i2c_device_id *id)
+static const struct i2c_device_id smm665_id[];
+
+static int smm665_probe(struct i2c_client *client)
 {
        struct i2c_adapter *adapter = client->adapter;
        struct smm665_data *data;
@@ -585,7 +586,7 @@ static int smm665_probe(struct i2c_client *client,
        mutex_init(&data->update_lock);
 
        data->client = client;
-       data->type = id->driver_data;
+       data->type = i2c_match_id(smm665_id, client)->driver_data;
        data->cmdreg = i2c_new_dummy_device(adapter, (client->addr & ~SMM665_REGMASK)
                                     | SMM665_CMDREG_BASE);
        if (IS_ERR(data->cmdreg))
@@ -694,7 +695,7 @@ static struct i2c_driver smm665_driver = {
        .driver = {
                   .name = "smm665",
                   },
-       .probe = smm665_probe,
+       .probe_new = smm665_probe,
        .remove = smm665_remove,
        .id_table = smm665_id,
 };
index 6cbb119e3d0e0a4f388c6740d4cb9e51d99dd62c..03a87aa2017aed2d2c1c7f25f8cd1956e536cc27 100644 (file)
@@ -587,8 +587,7 @@ static int smsc47m192_detect(struct i2c_client *client,
        return 0;
 }
 
-static int smsc47m192_probe(struct i2c_client *client,
-                           const struct i2c_device_id *id)
+static int smsc47m192_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -629,7 +628,7 @@ static struct i2c_driver smsc47m192_driver = {
        .driver = {
                .name   = "smsc47m192",
        },
-       .probe          = smsc47m192_probe,
+       .probe_new      = smsc47m192_probe,
        .id_table       = smsc47m192_id,
        .detect         = smsc47m192_detect,
        .address_list   = normal_i2c,
index 35b353c2b0a14130a00ebf8629a625a973910e87..6928be6dbe4e2b3f962dc4c88c83824b9dbb675e 100644 (file)
@@ -762,8 +762,7 @@ static struct attribute *stts751_attrs[] = {
 };
 ATTRIBUTE_GROUPS(stts751);
 
-static int stts751_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id)
+static int stts751_probe(struct i2c_client *client)
 {
        struct stts751_priv *priv;
        int ret;
@@ -822,7 +821,7 @@ static struct i2c_driver stts751_driver = {
                .name   = DEVNAME,
                .of_match_table = of_match_ptr(stts751_of_match),
        },
-       .probe          = stts751_probe,
+       .probe_new      = stts751_probe,
        .id_table       = stts751_id,
        .detect         = stts751_detect,
        .alert          = stts751_alert,
index 3e3b8c61bd7639c7aa7227fc57528f123c1bac1f..a52ca72af1201422c8afb42882c2d54568f629d3 100644 (file)
@@ -446,8 +446,7 @@ ATTRIBUTE_GROUPS(tc654);
  * device probe and removal
  */
 
-static int tc654_probe(struct i2c_client *client,
-                      const struct i2c_device_id *id)
+static int tc654_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct tc654_data *data;
@@ -488,7 +487,7 @@ static struct i2c_driver tc654_driver = {
        .driver = {
                   .name = "tc654",
                   },
-       .probe = tc654_probe,
+       .probe_new = tc654_probe,
        .id_table = tc654_id,
 };
 
index fcf638ed16a936f4b9af053a0daee406fc0a74d3..ace55da97fc29f717dc2eef9055196d9a9f41e0a 100644 (file)
@@ -103,8 +103,7 @@ static struct attribute *tc74_attrs[] = {
 
 ATTRIBUTE_GROUPS(tc74);
 
-static int tc74_probe(struct i2c_client *client,
-                     const struct i2c_device_id *dev_id)
+static int tc74_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct tc74_data *data;
@@ -161,7 +160,7 @@ static struct i2c_driver tc74_driver = {
        .driver = {
                .name   = "tc74",
        },
-       .probe  = tc74_probe,
+       .probe_new = tc74_probe,
        .id_table = tc74_id,
 };
 
index 3f5a983d928936c24f63c53b080da166a186eb7d..fde5e2d0825a4ead0686f600362e8e274a5b25af 100644 (file)
@@ -377,8 +377,9 @@ static void thmc50_init_client(struct thmc50_data *data)
        i2c_smbus_write_byte_data(client, THMC50_REG_CONF, config);
 }
 
-static int thmc50_probe(struct i2c_client *client,
-                       const struct i2c_device_id *id)
+static const struct i2c_device_id thmc50_id[];
+
+static int thmc50_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct thmc50_data *data;
@@ -390,7 +391,7 @@ static int thmc50_probe(struct i2c_client *client,
                return -ENOMEM;
 
        data->client = client;
-       data->type = id->driver_data;
+       data->type = i2c_match_id(thmc50_id, client)->driver_data;
        mutex_init(&data->update_lock);
 
        thmc50_init_client(data);
@@ -419,7 +420,7 @@ static struct i2c_driver thmc50_driver = {
        .driver = {
                .name = "thmc50",
        },
-       .probe = thmc50_probe,
+       .probe_new = thmc50_probe,
        .id_table = thmc50_id,
        .detect = thmc50_detect,
        .address_list = normal_i2c,
index 5fe35e5b2f739b895c6e5776ff7444afa9971c61..e867a0c2e5399ca04a83c2288f30dd7268a607c3 100644 (file)
@@ -189,8 +189,7 @@ static const struct regmap_config tmp102_regmap_config = {
        .use_single_write = true,
 };
 
-static int tmp102_probe(struct i2c_client *client,
-                       const struct i2c_device_id *id)
+static int tmp102_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -304,7 +303,7 @@ static struct i2c_driver tmp102_driver = {
        .driver.name    = DRIVER_NAME,
        .driver.of_match_table = of_match_ptr(tmp102_of_match),
        .driver.pm      = &tmp102_dev_pm_ops,
-       .probe          = tmp102_probe,
+       .probe_new      = tmp102_probe,
        .id_table       = tmp102_id,
 };
 
index 49851533935e302dc13c6199b7b181e913598499..a7e202cc832350139d89502746f4b40750d434cf 100644 (file)
@@ -109,8 +109,7 @@ static const struct regmap_config tmp103_regmap_config = {
        .volatile_reg = tmp103_regmap_is_volatile,
 };
 
-static int tmp103_probe(struct i2c_client *client,
-                       const struct i2c_device_id *id)
+static int tmp103_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -172,7 +171,7 @@ static struct i2c_driver tmp103_driver = {
                .of_match_table = of_match_ptr(tmp103_of_match),
                .pm     = &tmp103_dev_pm_ops,
        },
-       .probe          = tmp103_probe,
+       .probe_new      = tmp103_probe,
        .id_table       = tmp103_id,
 };
 
index fe587d4f9b2d4e1f4dc9f197e9938e2f72849b37..5435664c3f6e592596b8fa434efa3fb93831cfb8 100644 (file)
@@ -323,8 +323,7 @@ static const struct regmap_config tmp108_regmap_config = {
        .use_single_write = true,
 };
 
-static int tmp108_probe(struct i2c_client *client,
-                       const struct i2c_device_id *id)
+static int tmp108_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -433,7 +432,7 @@ static struct i2c_driver tmp108_driver = {
                .pm     = &tmp108_dev_pm_ops,
                .of_match_table = of_match_ptr(tmp108_of_ids),
        },
-       .probe          = tmp108_probe,
+       .probe_new      = tmp108_probe,
        .id_table       = tmp108_i2c_ids,
 };
 
index fa361d9949db7eb39e171eb10ad05f2c333610d3..9dc210b55e69b19f05dc2cf0f0666e8a0cc1a384 100644 (file)
@@ -683,8 +683,7 @@ static int tmp401_detect(struct i2c_client *client,
        return 0;
 }
 
-static int tmp401_probe(struct i2c_client *client,
-                       const struct i2c_device_id *id)
+static int tmp401_probe(struct i2c_client *client)
 {
        static const char * const names[] = {
                "TMP401", "TMP411", "TMP431", "TMP432", "TMP435", "TMP461"
@@ -700,7 +699,7 @@ static int tmp401_probe(struct i2c_client *client,
 
        data->client = client;
        mutex_init(&data->update_lock);
-       data->kind = id->driver_data;
+       data->kind = i2c_match_id(tmp401_id, client)->driver_data;
 
        /* Initialize the TMP401 chip */
        status = tmp401_init_client(data, client);
@@ -736,7 +735,7 @@ static struct i2c_driver tmp401_driver = {
        .driver = {
                .name   = "tmp401",
        },
-       .probe          = tmp401_probe,
+       .probe_new      = tmp401_probe,
        .id_table       = tmp401_id,
        .detect         = tmp401_detect,
        .address_list   = normal_i2c,
index 83a4fab151d2e1d1d671b6c2e9073f7277eaca86..ede66ea6a730dd82787c05cec909c920d4ba5d2c 100644 (file)
@@ -279,8 +279,7 @@ static const struct hwmon_ops tmp421_ops = {
        .read = tmp421_read,
 };
 
-static int tmp421_probe(struct i2c_client *client,
-                       const struct i2c_device_id *id)
+static int tmp421_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -296,7 +295,7 @@ static int tmp421_probe(struct i2c_client *client,
                data->channels = (unsigned long)
                        of_device_get_match_data(&client->dev);
        else
-               data->channels = id->driver_data;
+               data->channels = i2c_match_id(tmp421_id, client)->driver_data;
        data->client = client;
 
        err = tmp421_init_client(client);
@@ -327,7 +326,7 @@ static struct i2c_driver tmp421_driver = {
                .name   = "tmp421",
                .of_match_table = of_match_ptr(tmp421_of_match),
        },
-       .probe = tmp421_probe,
+       .probe_new = tmp421_probe,
        .id_table = tmp421_id,
        .detect = tmp421_detect,
        .address_list = normal_i2c,
index 96b695b32572e3bad9f9a6de44f8236402e72be3..88d11dc5feb98a8b56103e884c03baf806b0306c 100644 (file)
@@ -259,8 +259,7 @@ static const struct regmap_config w83773_regmap_config = {
        .val_bits = 8,
 };
 
-static int w83773_probe(struct i2c_client *client,
-                       const struct i2c_device_id *id)
+static int w83773_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device *hwmon_dev;
@@ -296,7 +295,7 @@ static struct i2c_driver w83773_driver = {
                .name   = "w83773g",
                .of_match_table = of_match_ptr(w83773_of_match),
        },
-       .probe = w83773_probe,
+       .probe_new = w83773_probe,
        .id_table = w83773_id,
 };
 
index d833a4f16c47b85f15fc8b340d036c5ce25823de..e84aa5604e64a4b7f8de7acca65a05e1bb939ed8 100644 (file)
@@ -1192,8 +1192,9 @@ static void w83781d_remove_files(struct device *dev)
        sysfs_remove_group(&dev->kobj, &w83781d_group_other);
 }
 
-static int
-w83781d_probe(struct i2c_client *client, const struct i2c_device_id *id)
+static const struct i2c_device_id w83781d_ids[];
+
+static int w83781d_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct w83781d_data *data;
@@ -1207,7 +1208,7 @@ w83781d_probe(struct i2c_client *client, const struct i2c_device_id *id)
        mutex_init(&data->lock);
        mutex_init(&data->update_lock);
 
-       data->type = id->driver_data;
+       data->type = i2c_match_id(w83781d_ids, client)->driver_data;
        data->client = client;
 
        /* attach secondary i2c lm75-like clients */
@@ -1575,7 +1576,7 @@ static struct i2c_driver w83781d_driver = {
        .driver = {
                .name = "w83781d",
        },
-       .probe          = w83781d_probe,
+       .probe_new      = w83781d_probe,
        .remove         = w83781d_remove,
        .id_table       = w83781d_ids,
        .detect         = w83781d_detect,
index 7fc8a1160c8f95269a8c29e07db0ff3e92c962d9..abd5c3a722b91a4aa9c6a1ebb2d24a376d00b801 100644 (file)
@@ -286,8 +286,7 @@ struct w83792d_data {
        u8 sf2_levels[3][4];    /* Smart FanII: Fan1,2,3 duty cycle levels */
 };
 
-static int w83792d_probe(struct i2c_client *client,
-                        const struct i2c_device_id *id);
+static int w83792d_probe(struct i2c_client *client);
 static int w83792d_detect(struct i2c_client *client,
                          struct i2c_board_info *info);
 static int w83792d_remove(struct i2c_client *client);
@@ -310,7 +309,7 @@ static struct i2c_driver w83792d_driver = {
        .driver = {
                .name = "w83792d",
        },
-       .probe          = w83792d_probe,
+       .probe_new      = w83792d_probe,
        .remove         = w83792d_remove,
        .id_table       = w83792d_id,
        .detect         = w83792d_detect,
@@ -1359,7 +1358,7 @@ w83792d_detect(struct i2c_client *client, struct i2c_board_info *info)
 }
 
 static int
-w83792d_probe(struct i2c_client *client, const struct i2c_device_id *id)
+w83792d_probe(struct i2c_client *client)
 {
        struct w83792d_data *data;
        struct device *dev = &client->dev;
index 6f6d925cf0175e5776d7c5e9ba86739828d6d909..656a77102ca6f422e903c2d43a5ba9729d64cfa3 100644 (file)
@@ -62,8 +62,7 @@ static const unsigned short normal_i2c[] = { 0x2e, I2C_CLIENT_END };
  * Functions declaration
  */
 
-static int w83l785ts_probe(struct i2c_client *client,
-                          const struct i2c_device_id *id);
+static int w83l785ts_probe(struct i2c_client *client);
 static int w83l785ts_detect(struct i2c_client *client,
                            struct i2c_board_info *info);
 static int w83l785ts_remove(struct i2c_client *client);
@@ -85,7 +84,7 @@ static struct i2c_driver w83l785ts_driver = {
        .driver = {
                .name   = "w83l785ts",
        },
-       .probe          = w83l785ts_probe,
+       .probe_new      = w83l785ts_probe,
        .remove         = w83l785ts_remove,
        .id_table       = w83l785ts_id,
        .detect         = w83l785ts_detect,
@@ -163,8 +162,7 @@ static int w83l785ts_detect(struct i2c_client *client,
        return 0;
 }
 
-static int w83l785ts_probe(struct i2c_client *client,
-                          const struct i2c_device_id *id)
+static int w83l785ts_probe(struct i2c_client *client)
 {
        struct w83l785ts_data *data;
        struct device *dev = &client->dev;
index ce98ec8794e2e5230f90a8377f44218f0d79cdc2..542afff1423beb6288cc7e0e1685004f74270489 100644 (file)
@@ -706,7 +706,7 @@ static void w83l786ng_init_client(struct i2c_client *client)
 }
 
 static int
-w83l786ng_probe(struct i2c_client *client, const struct i2c_device_id *id)
+w83l786ng_probe(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct w83l786ng_data *data;
@@ -752,7 +752,7 @@ static struct i2c_driver w83l786ng_driver = {
        .driver = {
                   .name = "w83l786ng",
        },
-       .probe          = w83l786ng_probe,
+       .probe_new      = w83l786ng_probe,
        .id_table       = w83l786ng_id,
        .detect         = w83l786ng_detect,
        .address_list   = normal_i2c,