hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/media/i2c/msp3400-driver.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Programming the mspx4xx sound processor family
34 *
....@@ -11,7 +12,7 @@
1112 *
1213 * FM-Mono
1314 * should work. The stereo modes are backward compatible to FM-mono,
14
- * therefore FM-Mono should be allways available.
15
+ * therefore FM-Mono should be always available.
1516 *
1617 * FM-Stereo (B/G, used in germany)
1718 * should work, with autodetect
....@@ -29,16 +30,6 @@
2930 *
3031 * 980623 Thomas Sailer (sailer@ife.ee.ethz.ch)
3132 * using soundcore instead of OSS
32
- *
33
- * This program is free software; you can redistribute it and/or
34
- * modify it under the terms of the GNU General Public License
35
- * as published by the Free Software Foundation; either version 2
36
- * of the License, or (at your option) any later version.
37
- *
38
- * This program is distributed in the hope that it will be useful,
39
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
40
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41
- * GNU General Public License for more details.
4233 */
4334
4435
....@@ -688,7 +679,7 @@
688679 #endif
689680
690681 if (!id)
691
- strlcpy(client->name, "msp3400", sizeof(client->name));
682
+ strscpy(client->name, "msp3400", sizeof(client->name));
692683
693684 if (msp_reset(client) == -1) {
694685 dev_dbg_lvl(&client->dev, 1, msp_debug, "msp3400 not found\n");
....@@ -703,8 +694,10 @@
703694 v4l2_i2c_subdev_init(sd, client, &msp_ops);
704695
705696 #if defined(CONFIG_MEDIA_CONTROLLER)
706
- state->pads[IF_AUD_DEC_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK;
707
- state->pads[IF_AUD_DEC_PAD_OUT].flags = MEDIA_PAD_FL_SOURCE;
697
+ state->pads[MSP3400_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK;
698
+ state->pads[MSP3400_PAD_IF_INPUT].sig_type = PAD_SIGNAL_AUDIO;
699
+ state->pads[MSP3400_PAD_OUT].flags = MEDIA_PAD_FL_SOURCE;
700
+ state->pads[MSP3400_PAD_OUT].sig_type = PAD_SIGNAL_AUDIO;
708701
709702 sd->entity.function = MEDIA_ENT_F_IF_AUD_DECODER;
710703