.. | .. |
---|
59 | 59 | SAA7118, |
---|
60 | 60 | }; |
---|
61 | 61 | |
---|
| 62 | +enum saa711x_pads { |
---|
| 63 | + SAA711X_PAD_IF_INPUT, |
---|
| 64 | + SAA711X_PAD_VID_OUT, |
---|
| 65 | + SAA711X_NUM_PADS |
---|
| 66 | +}; |
---|
| 67 | + |
---|
62 | 68 | struct saa711x_state { |
---|
63 | 69 | struct v4l2_subdev sd; |
---|
64 | 70 | #ifdef CONFIG_MEDIA_CONTROLLER |
---|
65 | | - struct media_pad pads[DEMOD_NUM_PADS]; |
---|
| 71 | + struct media_pad pads[SAA711X_NUM_PADS]; |
---|
66 | 72 | #endif |
---|
67 | 73 | struct v4l2_ctrl_handler hdl; |
---|
68 | 74 | |
---|
.. | .. |
---|
1760 | 1766 | * exists. However, tests on a device labeled as: |
---|
1761 | 1767 | * "GM7113C 1145" returned "10" on all 16 chip |
---|
1762 | 1768 | * version (reg 0x00) reads. So, we need to also |
---|
1763 | | - * accept at least verion 0. For now, let's just |
---|
| 1769 | + * accept at least version 0. For now, let's just |
---|
1764 | 1770 | * assume that a device that returns "0000" for |
---|
1765 | 1771 | * the lower nibble is a gm7113c. |
---|
1766 | 1772 | */ |
---|
1767 | 1773 | |
---|
1768 | | - strlcpy(name, "gm7113c", CHIP_VER_SIZE); |
---|
| 1774 | + strscpy(name, "gm7113c", CHIP_VER_SIZE); |
---|
1769 | 1775 | |
---|
1770 | 1776 | if (!autodetect && strcmp(name, id->name)) |
---|
1771 | 1777 | return -EINVAL; |
---|
.. | .. |
---|
1779 | 1785 | |
---|
1780 | 1786 | /* Check if it is a CJC7113 */ |
---|
1781 | 1787 | if (!memcmp(name, "1111111111111111", CHIP_VER_SIZE)) { |
---|
1782 | | - strlcpy(name, "cjc7113", CHIP_VER_SIZE); |
---|
| 1788 | + strscpy(name, "cjc7113", CHIP_VER_SIZE); |
---|
1783 | 1789 | |
---|
1784 | 1790 | if (!autodetect && strcmp(name, id->name)) |
---|
1785 | 1791 | return -EINVAL; |
---|
.. | .. |
---|
1825 | 1831 | if (ident < 0) |
---|
1826 | 1832 | return ident; |
---|
1827 | 1833 | |
---|
1828 | | - strlcpy(client->name, name, sizeof(client->name)); |
---|
| 1834 | + strscpy(client->name, name, sizeof(client->name)); |
---|
1829 | 1835 | |
---|
1830 | 1836 | state = devm_kzalloc(&client->dev, sizeof(*state), GFP_KERNEL); |
---|
1831 | 1837 | if (state == NULL) |
---|
.. | .. |
---|
1834 | 1840 | v4l2_i2c_subdev_init(sd, client, &saa711x_ops); |
---|
1835 | 1841 | |
---|
1836 | 1842 | #if defined(CONFIG_MEDIA_CONTROLLER) |
---|
1837 | | - state->pads[DEMOD_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK; |
---|
1838 | | - state->pads[DEMOD_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE; |
---|
1839 | | - state->pads[DEMOD_PAD_VBI_OUT].flags = MEDIA_PAD_FL_SOURCE; |
---|
| 1843 | + state->pads[SAA711X_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK; |
---|
| 1844 | + state->pads[SAA711X_PAD_IF_INPUT].sig_type = PAD_SIGNAL_ANALOG; |
---|
| 1845 | + state->pads[SAA711X_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE; |
---|
| 1846 | + state->pads[SAA711X_PAD_VID_OUT].sig_type = PAD_SIGNAL_DV; |
---|
1840 | 1847 | |
---|
1841 | 1848 | sd->entity.function = MEDIA_ENT_F_ATV_DECODER; |
---|
1842 | 1849 | |
---|
1843 | | - ret = media_entity_pads_init(&sd->entity, DEMOD_NUM_PADS, state->pads); |
---|
| 1850 | + ret = media_entity_pads_init(&sd->entity, SAA711X_NUM_PADS, |
---|
| 1851 | + state->pads); |
---|
1844 | 1852 | if (ret < 0) |
---|
1845 | 1853 | return ret; |
---|
1846 | 1854 | #endif |
---|