hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/hwmon/max1668.c
....@@ -1,22 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (c) 2011 David George <david.george@ska.ac.za>
34 *
45 * based on adm1021.c
56 * some credit to Christoph Scheurer, but largely a rewrite
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation; either version 2 of the License, or
10
- * (at your option) any later version.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU General Public License
18
- * along with this program; if not, write to the Free Software
19
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
207 */
218
229 #include <linux/module.h>
....@@ -404,8 +391,9 @@
404391 return 0;
405392 }
406393
407
-static int max1668_probe(struct i2c_client *client,
408
- const struct i2c_device_id *id)
394
+static const struct i2c_device_id max1668_id[];
395
+
396
+static int max1668_probe(struct i2c_client *client)
409397 {
410398 struct i2c_adapter *adapter = client->adapter;
411399 struct device *dev = &client->dev;
....@@ -420,7 +408,7 @@
420408 return -ENOMEM;
421409
422410 data->client = client;
423
- data->type = id->driver_data;
411
+ data->type = i2c_match_id(max1668_id, client)->driver_data;
424412 mutex_init(&data->update_lock);
425413
426414 /* sysfs hooks */
....@@ -447,7 +435,7 @@
447435 .driver = {
448436 .name = "max1668",
449437 },
450
- .probe = max1668_probe,
438
+ .probe_new = max1668_probe,
451439 .id_table = max1668_id,
452440 .detect = max1668_detect,
453441 .address_list = max1668_addr_list,