hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/hwmon/f75375s.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * f75375s.c - driver for the Fintek F75375/SP, F75373 and
34 * F75387SG/RG hardware monitoring features
....@@ -13,21 +14,6 @@
1314 *
1415 * f75387:
1516 * http://www.fintek.com.tw/files/productfiles/F75387_V027P.pdf
16
- *
17
- * This program is free software; you can redistribute it and/or modify
18
- * it under the terms of the GNU General Public License as published by
19
- * the Free Software Foundation; either version 2 of the License, or
20
- * (at your option) any later version.
21
- *
22
- * This program is distributed in the hope that it will be useful,
23
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
- * GNU General Public License for more details.
26
- *
27
- * You should have received a copy of the GNU General Public License
28
- * along with this program; if not, write to the Free Software
29
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30
- *
3117 */
3218
3319 #include <linux/module.h>
....@@ -127,8 +113,7 @@
127113
128114 static int f75375_detect(struct i2c_client *client,
129115 struct i2c_board_info *info);
130
-static int f75375_probe(struct i2c_client *client,
131
- const struct i2c_device_id *id);
116
+static int f75375_probe(struct i2c_client *client);
132117 static int f75375_remove(struct i2c_client *client);
133118
134119 static const struct i2c_device_id f75375_id[] = {
....@@ -144,7 +129,7 @@
144129 .driver = {
145130 .name = "f75375",
146131 },
147
- .probe = f75375_probe,
132
+ .probe_new = f75375_probe,
148133 .remove = f75375_remove,
149134 .id_table = f75375_id,
150135 .detect = f75375_detect,
....@@ -828,8 +813,7 @@
828813
829814 }
830815
831
-static int f75375_probe(struct i2c_client *client,
832
- const struct i2c_device_id *id)
816
+static int f75375_probe(struct i2c_client *client)
833817 {
834818 struct f75375_data *data;
835819 struct f75375s_platform_data *f75375s_pdata =
....@@ -846,7 +830,7 @@
846830
847831 i2c_set_clientdata(client, data);
848832 mutex_init(&data->update_lock);
849
- data->kind = id->driver_data;
833
+ data->kind = i2c_match_id(f75375_id, client)->driver_data;
850834
851835 err = sysfs_create_group(&client->dev.kobj, &f75375_group);
852836 if (err)