.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2011 David George <david.george@ska.ac.za> |
---|
3 | 4 | * |
---|
4 | 5 | * based on adm1021.c |
---|
5 | 6 | * 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. |
---|
20 | 7 | */ |
---|
21 | 8 | |
---|
22 | 9 | #include <linux/module.h> |
---|
.. | .. |
---|
404 | 391 | return 0; |
---|
405 | 392 | } |
---|
406 | 393 | |
---|
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) |
---|
409 | 397 | { |
---|
410 | 398 | struct i2c_adapter *adapter = client->adapter; |
---|
411 | 399 | struct device *dev = &client->dev; |
---|
.. | .. |
---|
420 | 408 | return -ENOMEM; |
---|
421 | 409 | |
---|
422 | 410 | data->client = client; |
---|
423 | | - data->type = id->driver_data; |
---|
| 411 | + data->type = i2c_match_id(max1668_id, client)->driver_data; |
---|
424 | 412 | mutex_init(&data->update_lock); |
---|
425 | 413 | |
---|
426 | 414 | /* sysfs hooks */ |
---|
.. | .. |
---|
447 | 435 | .driver = { |
---|
448 | 436 | .name = "max1668", |
---|
449 | 437 | }, |
---|
450 | | - .probe = max1668_probe, |
---|
| 438 | + .probe_new = max1668_probe, |
---|
451 | 439 | .id_table = max1668_id, |
---|
452 | 440 | .detect = max1668_detect, |
---|
453 | 441 | .address_list = max1668_addr_list, |
---|