forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/media/dvb-frontends/mn88472.c
....@@ -1,17 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Panasonic MN88472 DVB-T/T2/C demodulator driver
34 *
45 * Copyright (C) 2013 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 "mn88472_priv.h"
....@@ -621,12 +612,11 @@
621612 * Also, register bank 2 do not support sequential I/O. Only single
622613 * register write or read is allowed to that bank.
623614 */
624
- dev->client[1] = i2c_new_dummy(client->adapter, 0x1a);
625
- if (!dev->client[1]) {
626
- ret = -ENODEV;
615
+ dev->client[1] = i2c_new_dummy_device(client->adapter, 0x1a);
616
+ if (IS_ERR(dev->client[1])) {
617
+ ret = PTR_ERR(dev->client[1]);
627618 dev_err(&client->dev, "I2C registration failed\n");
628
- if (ret)
629
- goto err_regmap_0_regmap_exit;
619
+ goto err_regmap_0_regmap_exit;
630620 }
631621 dev->regmap[1] = regmap_init_i2c(dev->client[1], &regmap_config);
632622 if (IS_ERR(dev->regmap[1])) {
....@@ -635,12 +625,11 @@
635625 }
636626 i2c_set_clientdata(dev->client[1], dev);
637627
638
- dev->client[2] = i2c_new_dummy(client->adapter, 0x1c);
639
- if (!dev->client[2]) {
640
- ret = -ENODEV;
628
+ dev->client[2] = i2c_new_dummy_device(client->adapter, 0x1c);
629
+ if (IS_ERR(dev->client[2])) {
630
+ ret = PTR_ERR(dev->client[2]);
641631 dev_err(&client->dev, "2nd I2C registration failed\n");
642
- if (ret)
643
- goto err_regmap_1_regmap_exit;
632
+ goto err_regmap_1_regmap_exit;
644633 }
645634 dev->regmap[2] = regmap_init_i2c(dev->client[2], &regmap_config);
646635 if (IS_ERR(dev->regmap[2])) {