.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* Texas Instruments Triple 8-/10-BIT 165-/110-MSPS Video and Graphics |
---|
2 | 3 | * Digitizer with Horizontal PLL registers |
---|
3 | 4 | * |
---|
.. | .. |
---|
9 | 10 | * the TVP514x driver written by Vaibhav Hiremath <hvaibhav@ti.com> |
---|
10 | 11 | * and the TVP7002 driver in the TI LSP 2.10.00.14. Revisions by |
---|
11 | 12 | * Muralidharan Karicheri and Snehaprabha Narnakaje (TI). |
---|
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 | 13 | */ |
---|
23 | 14 | #include <linux/delay.h> |
---|
24 | 15 | #include <linux/i2c.h> |
---|
.. | .. |
---|
697 | 688 | int ret; |
---|
698 | 689 | |
---|
699 | 690 | ret = tvp7002_read(sd, reg->reg & 0xff, &val); |
---|
| 691 | + if (ret < 0) |
---|
| 692 | + return ret; |
---|
700 | 693 | reg->val = val; |
---|
701 | 694 | reg->size = 1; |
---|
702 | | - return ret; |
---|
| 695 | + return 0; |
---|
703 | 696 | } |
---|
704 | 697 | |
---|
705 | 698 | /* |
---|
.. | .. |
---|
889 | 882 | static struct tvp7002_config * |
---|
890 | 883 | tvp7002_get_pdata(struct i2c_client *client) |
---|
891 | 884 | { |
---|
892 | | - struct v4l2_fwnode_endpoint bus_cfg; |
---|
| 885 | + struct v4l2_fwnode_endpoint bus_cfg = { .bus_type = 0 }; |
---|
893 | 886 | struct tvp7002_config *pdata = NULL; |
---|
894 | 887 | struct device_node *endpoint; |
---|
895 | 888 | unsigned int flags; |
---|
.. | .. |
---|
939 | 932 | * Returns zero when successful, -EINVAL if register read fails or |
---|
940 | 933 | * -EIO if i2c access is not available. |
---|
941 | 934 | */ |
---|
942 | | -static int tvp7002_probe(struct i2c_client *c, const struct i2c_device_id *id) |
---|
| 935 | +static int tvp7002_probe(struct i2c_client *c) |
---|
943 | 936 | { |
---|
944 | 937 | struct tvp7002_config *pdata = tvp7002_get_pdata(c); |
---|
945 | 938 | struct v4l2_subdev *sd; |
---|
.. | .. |
---|
1084 | 1077 | .of_match_table = of_match_ptr(tvp7002_of_match), |
---|
1085 | 1078 | .name = TVP7002_MODULE_NAME, |
---|
1086 | 1079 | }, |
---|
1087 | | - .probe = tvp7002_probe, |
---|
| 1080 | + .probe_new = tvp7002_probe, |
---|
1088 | 1081 | .remove = tvp7002_remove, |
---|
1089 | 1082 | .id_table = tvp7002_id, |
---|
1090 | 1083 | }; |
---|