hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/hwmon/dme1737.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * dme1737.c - Driver for the SMSC DME1737, Asus A8000, SMSC SCH311x, SCH5027,
34 * and SCH5127 Super-I/O chips integrated hardware monitoring
....@@ -9,20 +10,6 @@
910 * if a SCH311x or SCH5127 chip is found. Both types of chips have very
1011 * similar hardware monitoring capabilities but differ in the way they can be
1112 * accessed.
12
- *
13
- * This program is free software; you can redistribute it and/or modify
14
- * it under the terms of the GNU General Public License as published by
15
- * the Free Software Foundation; either version 2 of the License, or
16
- * (at your option) any later version.
17
- *
18
- * This program is distributed in the hope that it will be useful,
19
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- * GNU General Public License for more details.
22
- *
23
- * You should have received a copy of the GNU General Public License
24
- * along with this program; if not, write to the Free Software
25
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2613 */
2714
2815 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -2474,8 +2461,9 @@
24742461 return 0;
24752462 }
24762463
2477
-static int dme1737_i2c_probe(struct i2c_client *client,
2478
- const struct i2c_device_id *id)
2464
+static const struct i2c_device_id dme1737_id[];
2465
+
2466
+static int dme1737_i2c_probe(struct i2c_client *client)
24792467 {
24802468 struct dme1737_data *data;
24812469 struct device *dev = &client->dev;
....@@ -2486,7 +2474,7 @@
24862474 return -ENOMEM;
24872475
24882476 i2c_set_clientdata(client, data);
2489
- data->type = id->driver_data;
2477
+ data->type = i2c_match_id(dme1737_id, client)->driver_data;
24902478 data->client = client;
24912479 data->name = client->name;
24922480 mutex_init(&data->update_lock);
....@@ -2542,7 +2530,7 @@
25422530 .driver = {
25432531 .name = "dme1737",
25442532 },
2545
- .probe = dme1737_i2c_probe,
2533
+ .probe_new = dme1737_i2c_probe,
25462534 .remove = dme1737_i2c_remove,
25472535 .id_table = dme1737_id,
25482536 .detect = dme1737_i2c_detect,