hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/media/dvb-frontends/mn88473.c
....@@ -1,17 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Panasonic MN88473 DVB-T/T2/C demodulator driver
34 *
45 * Copyright (C) 2014 Antti Palosaari <crope@iki.fi>
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
156 */
167
178 #include "mn88473_priv.h"
....@@ -666,12 +657,11 @@
666657 * Also, register bank 2 do not support sequential I/O. Only single
667658 * register write or read is allowed to that bank.
668659 */
669
- dev->client[1] = i2c_new_dummy(client->adapter, 0x1a);
670
- if (dev->client[1] == NULL) {
671
- ret = -ENODEV;
660
+ dev->client[1] = i2c_new_dummy_device(client->adapter, 0x1a);
661
+ if (IS_ERR(dev->client[1])) {
662
+ ret = PTR_ERR(dev->client[1]);
672663 dev_err(&client->dev, "I2C registration failed\n");
673
- if (ret)
674
- goto err_regmap_0_regmap_exit;
664
+ goto err_regmap_0_regmap_exit;
675665 }
676666 dev->regmap[1] = regmap_init_i2c(dev->client[1], &regmap_config);
677667 if (IS_ERR(dev->regmap[1])) {
....@@ -680,12 +670,11 @@
680670 }
681671 i2c_set_clientdata(dev->client[1], dev);
682672
683
- dev->client[2] = i2c_new_dummy(client->adapter, 0x1c);
684
- if (dev->client[2] == NULL) {
685
- ret = -ENODEV;
673
+ dev->client[2] = i2c_new_dummy_device(client->adapter, 0x1c);
674
+ if (IS_ERR(dev->client[2])) {
675
+ ret = PTR_ERR(dev->client[2]);
686676 dev_err(&client->dev, "2nd I2C registration failed\n");
687
- if (ret)
688
- goto err_regmap_1_regmap_exit;
677
+ goto err_regmap_1_regmap_exit;
689678 }
690679 dev->regmap[2] = regmap_init_i2c(dev->client[2], &regmap_config);
691680 if (IS_ERR(dev->regmap[2])) {