.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * dme1737.c - Driver for the SMSC DME1737, Asus A8000, SMSC SCH311x, SCH5027, |
---|
3 | 4 | * and SCH5127 Super-I/O chips integrated hardware monitoring |
---|
.. | .. |
---|
9 | 10 | * if a SCH311x or SCH5127 chip is found. Both types of chips have very |
---|
10 | 11 | * similar hardware monitoring capabilities but differ in the way they can be |
---|
11 | 12 | * 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. |
---|
26 | 13 | */ |
---|
27 | 14 | |
---|
28 | 15 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
---|
.. | .. |
---|
2474 | 2461 | return 0; |
---|
2475 | 2462 | } |
---|
2476 | 2463 | |
---|
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) |
---|
2479 | 2467 | { |
---|
2480 | 2468 | struct dme1737_data *data; |
---|
2481 | 2469 | struct device *dev = &client->dev; |
---|
.. | .. |
---|
2486 | 2474 | return -ENOMEM; |
---|
2487 | 2475 | |
---|
2488 | 2476 | i2c_set_clientdata(client, data); |
---|
2489 | | - data->type = id->driver_data; |
---|
| 2477 | + data->type = i2c_match_id(dme1737_id, client)->driver_data; |
---|
2490 | 2478 | data->client = client; |
---|
2491 | 2479 | data->name = client->name; |
---|
2492 | 2480 | mutex_init(&data->update_lock); |
---|
.. | .. |
---|
2542 | 2530 | .driver = { |
---|
2543 | 2531 | .name = "dme1737", |
---|
2544 | 2532 | }, |
---|
2545 | | - .probe = dme1737_i2c_probe, |
---|
| 2533 | + .probe_new = dme1737_i2c_probe, |
---|
2546 | 2534 | .remove = dme1737_i2c_remove, |
---|
2547 | 2535 | .id_table = dme1737_id, |
---|
2548 | 2536 | .detect = dme1737_i2c_detect, |
---|