1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
|
From patchwork Thu Oct 25 15:29:25 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
X-Patchwork-Id: 10656067
Return-Path:
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F102B13A9
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:35:56 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE4792BD1A
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:35:56 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id D0F412BD5E; Thu, 25 Oct 2018 15:35:56 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 773542BD1A
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:35:56 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Owner;
bh=NrUDxMYLkyg5HPJonb+JuSxGDm5o24A0GKSFyklBhZY=; b=gIPewPsT/1O8WJ9RBPCw8ODGzW
GILyywTpIKZt+wEqFL8ScdQihvDDcwX6YW5W/3ZkouomaEz4nzgODZzq7bkVW8fuRuP1c28WOBAx2
a3X6zHbjHmyPb18xAcEwsL91xBXPeqD+sfeMopAJo0p1VEMKTbDCh0P/nKp1y36ofTOCR+dvgN6hK
JdAKxnhkJPP9LDZMms3ogdQm7+NS71j9z64/EDqKzMp4DFace5/1ctwTYZEKMj3xNOBTO3Tom/BLH
59C/qyNypStFV8v2nzuFKYtS1ridG1jEFWlgmGSb69kF6EPlD+aQqTYDhjBIWgH22pvo45Zr49RoF
pJRKp7TA==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhfr-0003tV-EC; Thu, 25 Oct 2018 15:35:51 +0000
Received: from mout.kundenserver.de ([212.227.126.130])
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhae-0000Lj-TN; Thu, 25 Oct 2018 15:30:39 +0000
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1M5fZ4-1gE5122KBm-007FAs; Thu, 25 Oct 2018 17:30:06 +0200
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1M5fZ4-1gE5122KBm-007FAs; Thu, 25 Oct 2018 17:30:06 +0200
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>, gregkh@linuxfoundation.org,
Dave Stevenson <dave.stevenson@raspberrypi.org>
Subject: [PATCH RFC 01/11] staging: bcm2835-camera: Abort probe if there is no
camera
Date: Thu, 25 Oct 2018 17:29:25 +0200
Message-Id: <1540481375-15952-2-git-send-email-stefan.wahren@i2se.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
References: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
X-Provags-ID: V03:K1:dCzZlVGOCeNOZaUHjMGojvlwLXAOy+bBPiUsScqjgKIjyF4bZ2n
fTXGmEQwpFL7jVdjJ1Tt/6GWfp9EXq464h5IksjQtvjXzMY+E8O4jQmHfcRhfgclbZ0QsXp
+QyqZt1Hi1Zov7OF33PHPSgoWSTKQPxigf6k9poC8VJCR+zfTDvY8yBJEFdjjTgwvyR/Zuo
DrJX7U4zgIx+sVivwFxLg==
X-UI-Out-Filterresults: notjunk:1;V01:K0:i+6qK/+eezw=:zHpe+2lC0eBuqbOCeLBMRs
OLK2u2N1DuBkU16PQw4axU3u9xFcSRxHdsHmgcEk2ZM7VyT1yX05cu4oibgMckd4sc5V93Yo2
uGJ+QtrBZ64w7LwRcaB6vibyi+aYWgnR24t5G2K90+g9ZpOARA8bSdstLzC+stdzQgLEmIcpf
pmzX11g2PmmScD+VlfdHqsKfrRmTkY+aZaGFVw1tV7C6lmuruBW5fPbn7W3tRN1dVuKfTHl1g
jxKzV9Xavic8CVyxH2Ed0j/rFWibEDA0OOF57Noe2qM4thcoWXVGWanSYihfEJjulQTwA+uWx
yhZyD1cartFIMGNibv25CDJE6Yiw7cbvOVyZRrjjGuW7t2TqeSI43fXN7JI40DwoR4uI5yDpI
0DNauNjL3jDcv7cHYAZuu3X/sGnafiJLrUI/vTMPNJfJDXtgLHkKSiAWfyFQevKqbZbs/Wnsg
FPqQQRyDCSxBZ83ou3taSI/6GCVI352484NjMO1hxC1Nxd3bhA9H3Oal/cZMJ3FZB7+y03rW2
cF8CTEOeafDA/x+X2qEfHao1RTxLlLriV6HtNQ5Sa7cMbysnvMlNqHIQw23mxOnGkvCbmHu2B
ZBjq2PFINdn0x4pydcpFzGpkRDAxov/3sLXxD3RDLK+xzJU/xvYUL08ISo3kwlTwzQz052/yj
sqcSBUKOqtvCX9IknBICrw7N95dTj1Kl9ljHYGBtxiPJ3SCQiK7aD8Ebp132zueF8o2Q=
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20181025_083029_359138_0A882FDB
X-CRM114-Status: GOOD ( 12.74 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Cc: devel@driverdev.osuosl.org, Stefan Wahren <stefan.wahren@i2se.com>,
linux-arm-kernel@lists.infradead.org, tiwai@suse.de, mikebrady@eircom.net,
pbrobinson@gmail.com, nsaenzjulienne@suse.de,
linux-rpi-kernel@lists.infradead.org
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
Abort the probing of the camera driver in case there isn't a camera
actually connected to the Raspberry Pi. This solution also avoids a
NULL ptr dereference of mmal instance on driver unload.
Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index c04bdf0..d6fbef7 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -1841,6 +1841,12 @@ static int bcm2835_mmal_probe(struct platform_device *pdev)
num_cameras = get_num_cameras(instance,
resolutions,
MAX_BCM2835_CAMERAS);
+
+ if (num_cameras < 1) {
+ ret = -ENODEV;
+ goto cleanup_mmal;
+ }
+
if (num_cameras > MAX_BCM2835_CAMERAS)
num_cameras = MAX_BCM2835_CAMERAS;
@@ -1940,6 +1946,9 @@ static int bcm2835_mmal_probe(struct platform_device *pdev)
pr_info("%s: error %d while loading driver\n",
BM2835_MMAL_MODULE_NAME, ret);
+cleanup_mmal:
+ vchiq_mmal_finalise(instance);
+
return ret;
}
From patchwork Thu Oct 25 15:29:26 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
X-Patchwork-Id: 10656045
Return-Path:
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D9C5913A9
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:31:44 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C4EFB2BD4C
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:31:44 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id C2AE62BDD3; Thu, 25 Oct 2018 15:31:44 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 50A0A2BD7F
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:31:44 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Owner;
bh=f5+zPkV9bQzKxofIro+gPaTzUd/PCNDu+hDGly5jF5o=; b=Ihz+91UOQshJynJXeM7bFbLlUx
zyIS0dd3Mn4Lsrw44QdpKDFJNo40yjuvyenYFVB0FHwGikhfjmE6YGaAuB86nt0gQKvMJ9QP1LoDH
znvPTOuz5jRxKIe1xzWrGqdAEOj+oyuAPjM3V1bBkX9jCWkLIj8XdMeTuS4cjZ8lLtEIJ8J83Cvb9
om84cHNfa1aXM+mWjvlgZMFJPuvf8nutj4avYe0FIOS98m0SRe84L2GTvSgbRtLuTlvyfRO+2u8ZF
hrkpzcmKkpRW3YN2k7yr5GJMS75d4kdUBkiAlihXRSvgcJ1t05jQrgSFkg3A0WudsLs33VeV+G7/l
tEPXZy8g==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhbh-0000va-UJ; Thu, 25 Oct 2018 15:31:33 +0000
Received: from mout.kundenserver.de ([212.227.126.133])
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhae-0000Kk-U5; Thu, 25 Oct 2018 15:30:34 +0000
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1N332D-1faV7K0HuP-013MGX; Thu, 25 Oct 2018 17:30:07 +0200
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1N332D-1faV7K0HuP-013MGX; Thu, 25 Oct 2018 17:30:07 +0200
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>, gregkh@linuxfoundation.org,
Dave Stevenson <dave.stevenson@raspberrypi.org>
Subject: [PATCH RFC 02/11] staging: bcm2835-camera: fix module autoloading
Date: Thu, 25 Oct 2018 17:29:26 +0200
Message-Id: <1540481375-15952-3-git-send-email-stefan.wahren@i2se.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
References: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
X-Provags-ID: V03:K1:UKPEE3Ay/Jq4AoJU+2bmQQA64OpZEco/TqQHNxQV/cuCrT4vDF4
16RxToISFJI9unOYdsaUOxdiy0U6PxNqqjApaDFzaMot2h773w5Vet/3zyQ76CVHOyIf1Du
zqIg+ENwL0QedYCvleI9sDY4+tLArJIE57NiimHZw9z19Ng23T19wig5ap82BBCjBxZAadW
nSt3GryJmtHNryZ7SUERQ==
X-UI-Out-Filterresults: notjunk:1;V01:K0:l5n3W8F7pSo=:z0kx8T/PTAsZyYfC+8lvA7
yZVV6Dn+PKbCZAvGlq4z/zOCTHkUBHh90rJu9pQID3Hb9vMDosJzfWtX6kJn0VR2ctsFVsS9k
0nmvpZrsxYfX0SYIi5jYPOXrvyF4mZNXUrz4kRd49Vl+HLAjuTVY/hPqx/4fx1nSwAfepGerS
xNkyqRuFZXPychWNzxjwFjQy8sVdRk/fWabRnVxH9RQXsjQ9BJh5JxbqyP7R85e+vqym84OVx
YHyUiXQMBzlP4+bICBVi0hMEhlhx59llzXfcZaMBJpKJGYBag4lwjXw3ZpfJlOd+i31k2lwrG
XCc34mE0y7sHr9xE5b82hZvGvpPNteISLlu4ctPFwEFy8VY/QhnJgjuGjMoE1XKex5LERyENj
SbupgFzTI32Z1EtUqdhAfNz7J2b5sX9LKcvyDbdQzSWx/sNxRypK+svqpb8fi+BELz6XL/cNO
dzNBIn9jJa6vOmuInWJCEGRIk0r0zXCt12fKXoUqG8o9iveWiG8uFVCaZmGRGQCpupGPXzoxX
NZmFY40fJWwRSXjeP4jcUhBsCh50lUZUJPyaj4uXUin57DzFTpuu/35YQVFHxncYT/PIoQf5t
+JafuJWnbiDHzWUQy0Sx+u+2jvPxb63vJscDG3cpXA5e2NZJhmvUXDRV+0+VRspuFEaxoSXfX
5m++tgZZF4OWfXk1WTvHG9yA8OaWg+NKmnFf+jFDQdE0YaAyUQ8Nn/vrCwOnpVeHcn9g=
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20181025_083029_311727_3302F28F
X-CRM114-Status: GOOD ( 10.69 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Cc: devel@driverdev.osuosl.org, Stefan Wahren <stefan.wahren@i2se.com>,
linux-arm-kernel@lists.infradead.org, tiwai@suse.de, mikebrady@eircom.net,
pbrobinson@gmail.com, nsaenzjulienne@suse.de,
linux-rpi-kernel@lists.infradead.org
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
In order to make the module bcm2835-camera load automatically, we need to
add a module alias.
Fixes: 4bebb0312ea9 ("staging/bcm2835-camera: Set ourselves up as a platform driver.")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index d6fbef7..7d3222c 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -47,6 +47,7 @@ MODULE_DESCRIPTION("Broadcom 2835 MMAL video capture");
MODULE_AUTHOR("Vincent Sanders");
MODULE_LICENSE("GPL");
MODULE_VERSION(BM2835_MMAL_VERSION);
+MODULE_ALIAS("platform:bcm2835-camera");
int bcm2835_v4l2_debug;
module_param_named(debug, bcm2835_v4l2_debug, int, 0644);
From patchwork Thu Oct 25 15:29:27 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
X-Patchwork-Id: 10656063
Return-Path:
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3D9D013A9
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:35:15 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2717E2BD1A
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:35:15 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id 173BC2BD5E; Thu, 25 Oct 2018 15:35:15 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 93B5F2BD1A
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:35:14 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Owner;
bh=2yj1SMJtP4Ml/1G88Jr9/OktNCewkFJgiV1e/fbCuAI=; b=YmibdjGDcP4wujkQx9THL/o122
IukKCsRtTKeNAKmPTaKRjwYey42luZ2ePliuJl3N65U8BVcjg3jUMvz+z/74hg44DOlMHeufSjmpA
E6YtVGz0YfdBZaOJuSNUtknoPPicHtf8Zkle+bKDqBIBmdQxrqfBI5sCrhuLMICaf2kLrtZdlb3zI
2+gYOWrQoYFLFMpHyDtDrXeXGWhuC/P1OycCKc171cJaE2/n+JQ+m4smRQEQCCjwUqPg9+MsK1EyB
gdXpDOyC9GHLRmnQtMkf2KCQckXyPin11yhsm6wLugT8FP9Mk94VHbde+yb2QbXa6vf0YD/NR8zka
WDFHXmsg==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhf8-0002OL-PK; Thu, 25 Oct 2018 15:35:06 +0000
Received: from mout.kundenserver.de ([212.227.126.130])
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhaf-0000Lg-0s; Thu, 25 Oct 2018 15:30:43 +0000
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1Mwfn8-1fN4r72Mu2-00y6oI; Thu, 25 Oct 2018 17:30:07 +0200
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1Mwfn8-1fN4r72Mu2-00y6oI; Thu, 25 Oct 2018 17:30:07 +0200
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>, gregkh@linuxfoundation.org,
Dave Stevenson <dave.stevenson@raspberrypi.org>
Subject: [PATCH RFC 03/11] staging: bcm2835-camera: Move module info to the
end
Date: Thu, 25 Oct 2018 17:29:27 +0200
Message-Id: <1540481375-15952-4-git-send-email-stefan.wahren@i2se.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
References: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
X-Provags-ID: V03:K1:8y2wFjs9qrSjG/qKBQnmgwNUDNfGIyFb7EIQrj2zwi6NcmglS9q
6gs/xKBDxEiZHhL9gceaj3UaYKEzUaFHxHWzQ6wzPPl0WBXRCCw4Hhj2uIqjo3OUBjnQhfr
PjLP+e9HrXkjTUOTFh+BsPGMoG2h1c+vvVyB8LOFW6NSi0+ja8Yt1X7GNSSblAGQIS70vrq
Bn/yGBB8eb4SiROx2pq+w==
X-UI-Out-Filterresults: notjunk:1;V01:K0:3fJob6Kq7uw=:sqFrskHmjKOJ26DGHBqyfN
NBK/H9/qXWqgvO0JNCddv2yolL27PgoNHmuFqM/Ok2f02DfTQBmlwW9CK5njXOw2RK90Q0UCJ
49g4D8mZ9poZ7Q4l62sM569r9qtGlS0FcSxVE+cG1zvGUvIRhmz3Z+xKJvFYICwGb9PB2gnUy
bLyJcGuqquzlWK52elAl9ZVWh7pnpgijobd2FqN6yULDoehObxBPqQgbggz/DX++lH5Iqo6R7
1+wtwDeSpHWjGupxiNQlrinMxxxs+PMqU4/fnpubjmYpJlFcGuyH8PK90yk/CsaL9xkup0u72
njasdqw4iIyaAH5vLyRDXP0HSBB4WRchiItuwogC/ahEqak4nSJ7xLX8ap/H7ZrJoHdrbAY/1
eXLcDxuThrgRzth9oO7zLhk2BOblrleMCAUBPKWLl9fMtrt8jfFhiSL7ibOXNdMKTv3fjRsm0
hXFxRDiXBViGEkR04YJlm+XLUbO/5ErF21ke4P2jQ6ec8ea4x5BMUXYsyKCkrp8eu98RrmE0G
szbgb1GlbLNbn/ZbHWfBQiIRA8Fpnk0TRiObUgfzk222111SnnfMZZDa2+hj7w19YPaSuARoM
xXBEmD1h2S8QRuMlDDQa5BQjgTF4e5kWVnhZHvVBYpMA2Ju3T4Wt0wOmP5E5mI73lC1oREZ6U
jcLnJjhGkAt5X+WuxWyKlalcIccHp6/kMEeM5IzVDtAFu2GrWNyWgTkslnV0MVT8djOw=
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20181025_083029_405735_14E5AE7D
X-CRM114-Status: GOOD ( 11.33 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Cc: devel@driverdev.osuosl.org, Stefan Wahren <stefan.wahren@i2se.com>,
linux-arm-kernel@lists.infradead.org, tiwai@suse.de, mikebrady@eircom.net,
pbrobinson@gmail.com, nsaenzjulienne@suse.de,
linux-rpi-kernel@lists.infradead.org
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
In order to have this more consistent between the vc04 services move
the module information to the end of the file.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
.../staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index 7d3222c..cd773eb 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -43,12 +43,6 @@
#define MAX_BCM2835_CAMERAS 2
-MODULE_DESCRIPTION("Broadcom 2835 MMAL video capture");
-MODULE_AUTHOR("Vincent Sanders");
-MODULE_LICENSE("GPL");
-MODULE_VERSION(BM2835_MMAL_VERSION);
-MODULE_ALIAS("platform:bcm2835-camera");
-
int bcm2835_v4l2_debug;
module_param_named(debug, bcm2835_v4l2_debug, int, 0644);
MODULE_PARM_DESC(bcm2835_v4l2_debug, "Debug level 0-2");
@@ -1976,3 +1970,9 @@ static struct platform_driver bcm2835_camera_driver = {
};
module_platform_driver(bcm2835_camera_driver)
+
+MODULE_DESCRIPTION("Broadcom 2835 MMAL video capture");
+MODULE_AUTHOR("Vincent Sanders");
+MODULE_LICENSE("GPL");
+MODULE_VERSION(BM2835_MMAL_VERSION);
+MODULE_ALIAS("platform:bcm2835-camera");
From patchwork Thu Oct 25 15:29:28 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
X-Patchwork-Id: 10656071
Return-Path:
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 570A514DE
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:36:35 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43A2F2BD42
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:36:35 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id 365542BD6B; Thu, 25 Oct 2018 15:36:35 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BF9182BD42
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:36:34 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Owner;
bh=IaWX8cuJQ8XK23gnaA8rkCWxXWnW8njjz+TVhgK3fIw=; b=iHNLPfE+sBFSOZTNycMeTbbMGB
usdRTMHN3oqLwdcAnTIvN9ag9fPyjmP3WZLtF23+LcQ0IvkOLat44KVOi3j8HJG33HRaqkjCJViJo
Ea1xsz493mH/sTBt+g6idS5I1pjpxezYZpvhv7/8KCtYJIr9rGU9qyrG+WEhe6vOfMjLpBlwP0O9O
f8Mi+RJ7dk53JYupFaCXzTMo5Ok/4GcMOAeQI4bFjL5V0u58LD9KInRPDqZe9QZY32iNfNWSaa8fj
oBpUav0H7SJlBTYvWECoOnb/DYBUS+wbBA2PUaFukwy392FjWaemHx9Klo2gkDZTowTcRZdP91fXw
VhZg8afg==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhgT-00048h-Bg; Thu, 25 Oct 2018 15:36:29 +0000
Received: from mout.kundenserver.de ([212.227.126.131])
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhag-0000U3-5d; Thu, 25 Oct 2018 15:30:43 +0000
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1N5FxN-1fYICA44vd-0119LN; Thu, 25 Oct 2018 17:30:08 +0200
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1N5FxN-1fYICA44vd-0119LN; Thu, 25 Oct 2018 17:30:08 +0200
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>, gregkh@linuxfoundation.org,
Dave Stevenson <dave.stevenson@raspberrypi.org>
Subject: [PATCH RFC 04/11] staging: vchiq_arm: Fix platform device
unregistration
Date: Thu, 25 Oct 2018 17:29:28 +0200
Message-Id: <1540481375-15952-5-git-send-email-stefan.wahren@i2se.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
References: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
X-Provags-ID: V03:K1:ZpfGsNRdlbw46XCRDhXAtssmOM+Uut/HISVLbmIGJbtYFzNnAPa
ZrEZBwltf5QZ2j3zQTV3Ri6JZ0EGo50dF6X5BapX5TIt6ortDXJbfZv0x2IYrPbe3qpNth7
EcaZvd5c28Z3fUpMcHLeuwDhSkHZzCkApUu1UQYCFPXl/kzciJSaPqDWzdMNiVlAPbvl3OO
eIWSfQCRucVI7ZjpV7eog==
X-UI-Out-Filterresults: notjunk:1;V01:K0:iZOgAN2ib3g=:Cq49TxyA1Y0SZbgfS6Opsz
W8InT8iYH17xsaqw0gbjx69OU7Msiqodf6E7VC0ll/IKrEcxuXBD2ZWiVLJ2rGF9xr7PI+WzP
DDUJZqUpmZS8pMwNT08GQj75ADaBMfTnFLeQyjsxNdpOrIrcU1/8MXBqRIuDHSvrXN5wvTnHs
FHf+Fc08pO21Qu7wnGDT+02y9clYejkHnAB5NFRl3uy5UqbRDaP2Sz8GGkaSzwLYtWCbliwgt
Ar/kQefm25m8AE/r+/SZOW84hUWgBvgZ5MH4Uo7vciZFhEWxjDgpuYuM1g2M86DVjx3WiyZqV
5Rc/Zy5FqajYMHkEplyTIGrwSexgSjF6YEI4HKL8YlL80s0ISwOYZkUCMmkVOiMEddLEFDYPF
MyUTKdKPdsmJY1HBhv8SjxyfTT6I18g/HbA6FnkSU/s6ktoKxsZ9aAc+pvWqIK1ooJznLHJgv
3+LHOn5x1Qdj4KwMS6wNLTWnx0NWqFUqI4XnilgJnrBBBZ7duHeC7MAeNf/t5+oMw50QR8oYb
fmSAmjIbkscdf0IeCIWaVyPWLGwBLiOmvkuM6rA9yZBQy6R2KrDfFy/CvwaQF+95GwN5UJe3j
oeNz8SU39CsCTvQVEkunc9EmIzLdkw9EFI2Py9kGFwtKt5QoB/xPW3DBlfAt+wD+SpfS0VVpt
s5L5+HCL506Pov4Gx57vaX1D50lxu8rcSJLoZdmIkb/aOcqKGW+dweTizdlsV+F5M4hY=
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20181025_083030_530712_6CD3267F
X-CRM114-Status: GOOD ( 12.05 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Cc: devel@driverdev.osuosl.org, Stefan Wahren <stefan.wahren@i2se.com>,
linux-arm-kernel@lists.infradead.org, tiwai@suse.de, mikebrady@eircom.net,
pbrobinson@gmail.com, nsaenzjulienne@suse.de,
linux-rpi-kernel@lists.infradead.org
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
In error case platform_device_register_data would return an ERR_PTR
instead of NULL. So we better check this before unregistration.
Fixes: 37b7b3087a2f ("staging/vc04_services: Register a platform device for the camera driver.")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index ea78937..d7d7c2f0 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -3672,7 +3672,8 @@ static int vchiq_probe(struct platform_device *pdev)
static int vchiq_remove(struct platform_device *pdev)
{
- platform_device_unregister(bcm2835_camera);
+ if (!IS_ERR(bcm2835_camera))
+ platform_device_unregister(bcm2835_camera);
vchiq_debugfs_deinit();
device_destroy(vchiq_class, vchiq_devid);
class_destroy(vchiq_class);
From patchwork Thu Oct 25 15:29:29 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
X-Patchwork-Id: 10656047
Return-Path:
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1D61014DE
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:32:35 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B7F92BD4C
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:32:35 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id F3AA72BD66; Thu, 25 Oct 2018 15:32:34 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9758A2BD4C
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:32:34 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Owner;
bh=A6M1yl+Vp913xlM2NDevmFI2qJkyIXqmWmqi3TEOUnA=; b=OH2QHIefAyg8RFQLQ2ZZ0b9TSK
SwyK7KN9Mcmodm63NgbhVP/M3bcuJ+rm9oN/SwqafSV/Dothhc1Q8QDlAILT1pX28V/I/Udcwuhu3
2j15cil3K2a31v7LNOfgKt95MtZsHkkGvif7iIi6N4zP5g4fCYjN7iaFg5CQCY7VAOGc+6wAdM9ae
i6rUl6GFS5xUzbwekJOMfNgqli9nHQMFoS9TpnsAAdr4a4IMwjTqNFI/ZPmrzCFTU7KT7j50K2RyZ
TxgkbVDhmJa+0VHZxFth9AS6SsBHb16CYeon5WCBL0v4ZTyntRztvQVA/lIUenSBuRYy+0VvSSfet
mGIvjO1w==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhcS-0001HO-EZ; Thu, 25 Oct 2018 15:32:20 +0000
Received: from mout.kundenserver.de ([212.227.126.130])
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhae-0000Lo-Qz; Thu, 25 Oct 2018 15:30:34 +0000
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1MqbDs-1fkkUq1YTg-00mej6; Thu, 25 Oct 2018 17:30:08 +0200
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1MqbDs-1fkkUq1YTg-00mej6; Thu, 25 Oct 2018 17:30:08 +0200
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>, gregkh@linuxfoundation.org,
Dave Stevenson <dave.stevenson@raspberrypi.org>
Subject: [PATCH RFC 05/11] staging: vchiq_arm: Fix camera device registration
Date: Thu, 25 Oct 2018 17:29:29 +0200
Message-Id: <1540481375-15952-6-git-send-email-stefan.wahren@i2se.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
References: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
X-Provags-ID: V03:K1:eXM8wIsYDFj907gifn9aReZZheRe6ZU/R4ic5ERp58eKGEbsteD
CkhJ7dYD52n5rIELRbXxApodKIuW1oGIzeLEC3U5q8NbWCP1PJf+CPWp4QVW6Br7u4qA3Zk
mLsgbTWyrOgSNHATxnrWsx3ISIuyUCdLbGIryIvh3I0bynZzEgqZyqOEDaiayHIR2k+q1lZ
ekCorg3x4NfoCyJWDXnPA==
X-UI-Out-Filterresults: notjunk:1;V01:K0:nuW57etu7/M=:5pjngzlVFlHcgxH8YP46ev
xO2skvY4uwEf63sAIyllM3DdPzHF+aZzx7vWnohTze4vl6tbNT+N20vr7VBaQ3XIrS+W/sObb
im40VhcLuT9fZiA+CybPEtKEF3cf9RYCMqVtum9qGWedsZrV7XOomMh9y1sVyiW7GAoibmQ2j
738RpZMWOzHxWgoEtDFA8rrE/unI9XcaxSP/TLr10hJxn9yo1bv6U4d50/TX4Zdn7wIWzXILd
rvxR/njfN30zn1GpGPKxwoM6K9Czc96ODN3iq/F2+hEGlPiSAjcLcAX8gbOfsawfSQ4w/oDMK
lAgX9y4QxNIuFFL/xhWG75UWaBzRuq7/mFkEb+NoRkoOBWivAPgQNLy0D8o6hwKV6jePtgMoE
XW1hbLLQUGMzAEGEeO77TbbH/5Ev4g+oC1elWdQoLUhokddUOSYvqaNXxuvfueRU5tn66Afmn
QFe5tW5GVR5DrurJFqogLgN6XHG7zLO96U6JV8CWMIV7cvs0HsI+lRKfznQPnpunoDuHZg82R
cVONtARucWAJp9k83s0LyQOO2vwor/ZB9utN4be03F7cXB+4aa5l9bqgSJ3woVw9bd66UMqO+
z7aXZDXWMB8kUV4cbfR8O/Ts3wX3QYBOyFmQVnXnreUQOGpSEzbOgVQ0FddZ//HS2BIEqNMzD
k/tuAymzBQWPOpHfwv0RW5GvbiVHvPJkzaDM/cJf5BG11eK3f1Jvu//mDBom6YY78W7s=
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20181025_083029_212718_59E2DE9B
X-CRM114-Status: GOOD ( 13.85 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Cc: devel@driverdev.osuosl.org, Stefan Wahren <stefan.wahren@i2se.com>,
linux-arm-kernel@lists.infradead.org, tiwai@suse.de, mikebrady@eircom.net,
pbrobinson@gmail.com, nsaenzjulienne@suse.de,
linux-rpi-kernel@lists.infradead.org
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
Since the camera driver isn't probed via DT, we need to properly setup DMA.
Fixes: 37b7b3087a2f ("staging/vc04_services: Register a platform device for the camera driver.")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
.../vc04_services/interface/vchiq_arm/vchiq_arm.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index d7d7c2f0..778a252 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -49,6 +49,7 @@
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/compat.h>
+#include <linux/dma-mapping.h>
#include <soc/bcm2835/raspberrypi-firmware.h>
#include "vchiq_core.h"
@@ -3588,6 +3589,21 @@ static const struct of_device_id vchiq_of_match[] = {
};
MODULE_DEVICE_TABLE(of, vchiq_of_match);
+static struct platform_device *
+vchiq_register_child(struct platform_device *pdev, const char *name)
+{
+ struct platform_device_info pdevinfo;
+
+ memset(&pdevinfo, 0, sizeof(pdevinfo));
+
+ pdevinfo.parent = &pdev->dev;
+ pdevinfo.name = name;
+ pdevinfo.id = PLATFORM_DEVID_NONE;
+ pdevinfo.dma_mask = DMA_BIT_MASK(32);
+
+ return platform_device_register_full(&pdevinfo);
+}
+
static int vchiq_probe(struct platform_device *pdev)
{
struct device_node *fw_node;
@@ -3653,9 +3669,7 @@ static int vchiq_probe(struct platform_device *pdev)
VCHIQ_VERSION, VCHIQ_VERSION_MIN,
MAJOR(vchiq_devid), MINOR(vchiq_devid));
- bcm2835_camera = platform_device_register_data(&pdev->dev,
- "bcm2835-camera", -1,
- NULL, 0);
+ bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera");
return 0;
From patchwork Thu Oct 25 15:29:30 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
X-Patchwork-Id: 10656039
Return-Path:
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 462EB13A9
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:30:41 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 356102BD91
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:30:41 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id 338232BD98; Thu, 25 Oct 2018 15:30:41 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 940AB2BDA1
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:30:40 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Owner;
bh=dzlIUR5tyxs0ypx1KsmTLhg+vSxlQ51B/qgqyenThPw=; b=M7eGnXawRpXexevwj4B8ey9Isv
oWKFmnFh0p86JuMTPAqW7UmAtl3k5fHyMeS3n/WDWvzS/GFBnVanWSmtpY/WrWpLjnNaMGg0VolHT
SduTXG0d95n00ABKniwi7lZOu5kT7UL2bzfiO0rTI9xRbQ85fAmr30LWigJpHvrkBcZxrj7gQXNRl
FdkfGn0+jjuGshEL+UzyFqS0xiu4ll5R93yF79lB4WRyn3KZIwWsphSF5FpdhZyya9eb20Sy6Nf2h
w9yBN0mT8GOgrYdU/UipsQn/1/wsszbT2OGVdPn3M1hTSBWMxyYOsAewks/vsEfDOynCmlKEeEdPO
lLIaC6VA==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhal-0000dc-4b; Thu, 25 Oct 2018 15:30:35 +0000
Received: from mout.kundenserver.de ([212.227.126.187])
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhae-0000Wx-QE; Thu, 25 Oct 2018 15:30:30 +0000
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1M27Bp-1gHdOb3IWP-002YTt; Thu, 25 Oct 2018 17:30:08 +0200
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1M27Bp-1gHdOb3IWP-002YTt; Thu, 25 Oct 2018 17:30:08 +0200
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>, gregkh@linuxfoundation.org,
Dave Stevenson <dave.stevenson@raspberrypi.org>
Subject: [PATCH RFC 06/11] staging: vchiq_arm: Register a platform device for
audio
Date: Thu, 25 Oct 2018 17:29:30 +0200
Message-Id: <1540481375-15952-7-git-send-email-stefan.wahren@i2se.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
References: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
X-Provags-ID: V03:K1:8V+9Ywu5lptAVAEwEvJbQR7/SLvh6grzlExBpBZeTaFNHtyKXcx
xfGTDbPYMOfVJBSVTXT69Yg2fQ8bL/sViK69LktEo6Ow25U9Z0G5SpSUn1xsJ4TXg6NqDiX
qW8Z1hSFxwdXEbkh91OqBfG6qlF1sQHXuERL7NdgoU4sMl5V1UaFjeO6aneHINs018ZETdy
BzLM6lcOcSv/xqhLOei/g==
X-UI-Out-Filterresults: notjunk:1;V01:K0:JpWVyWifFSg=:8S5h0xDCnejFH9cYGvYDYg
LcIlecwjyP3Cm1ntHRKBKlEFrIh0IrgJIzUlPsNXMcH9OhwGu1vx4ux+V1TXlsFxE52UlcfXP
KfWiUucQ5DuibZMCDqpsYG669U2NIx+HNqLv0XhPQRm0xqC4wVHw61PwaTAnj2aN7NZ6M/0cD
ftpwAP3E+ktlOn7rQlCNUGX8uUhHWdgC7+DWvnBLzupYgfUSiGk+ijNkCKIFJEc0yW/JKDvYY
4HdsEekTHT+6yiwwD/63088MhL4NN20ZiuiSQ8vfrb3VLpvmVg9zXgnpU+Arqh5yQrpcLk44Q
bx+pPrA3KyAn3oRUjCqUIfu9h7FPYYlanI3UP+I7N88zAlAyD4Jyzv0+KkbkLRMYEL9tMKtix
1LHmpSUdIMjkD9fpOPjLFfVVmTkMUzAiDtcPNCuwbBDOig54oKSnU8by3685i8wa2nuE+Zk/I
T4xpXq8owjCwTwIja98V73sErvVp31fc44Cszhkg4uj70X6F8KH9Rh4sp3R2OyxgoO+pbP0Jv
O3RK9sVOrYFggn/zVKt5Ewu2ZKEA7tO5MoKYOTjgG9dK2gOPaqYW9z1f3KndChRC+97FZh5ZL
Klnl2wBNddjY7+U3+9MdIYqItLXss0BoL+xtWnZRWKVZaiCNbzx66/EPu8KpjrxIBeyv1j4C9
hZsgNv+Uihei/9qa0wWUUQTg96DxKVy/CFxRZFjMY2aCIEdIQpiUnwd/vl98Qz9cV25E=
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20181025_083029_183754_BC82271E
X-CRM114-Status: GOOD ( 12.00 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Cc: devel@driverdev.osuosl.org, Stefan Wahren <stefan.wahren@i2se.com>,
linux-arm-kernel@lists.infradead.org, tiwai@suse.de, mikebrady@eircom.net,
pbrobinson@gmail.com, nsaenzjulienne@suse.de,
linux-rpi-kernel@lists.infradead.org
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
Following Eric's commit 37b7b3087a2f ("staging/vc04_services: Register a
platform device for the camera driver.") this register the audio driver as
a platform device, too.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index 778a252..fc6388b 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -170,6 +170,7 @@ static struct class *vchiq_class;
static struct device *vchiq_dev;
static DEFINE_SPINLOCK(msg_queue_spinlock);
static struct platform_device *bcm2835_camera;
+static struct platform_device *bcm2835_audio;
static struct vchiq_drvdata bcm2835_drvdata = {
.cache_line_size = 32,
@@ -3670,6 +3671,7 @@ static int vchiq_probe(struct platform_device *pdev)
MAJOR(vchiq_devid), MINOR(vchiq_devid));
bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera");
+ bcm2835_audio = vchiq_register_child(pdev, "bcm2835_audio");
return 0;
@@ -3686,6 +3688,8 @@ static int vchiq_probe(struct platform_device *pdev)
static int vchiq_remove(struct platform_device *pdev)
{
+ if (!IS_ERR(bcm2835_audio))
+ platform_device_unregister(bcm2835_audio);
if (!IS_ERR(bcm2835_camera))
platform_device_unregister(bcm2835_camera);
vchiq_debugfs_deinit();
From patchwork Thu Oct 25 15:29:31 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
X-Patchwork-Id: 10656061
Return-Path:
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B7BB514DE
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:34:31 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A523A2BB88
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:34:31 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id 98CA82BDB0; Thu, 25 Oct 2018 15:34:31 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 14C062BB88
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:34:31 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Owner;
bh=12+KvhX5E6VGVfGyFUcVRENo/rJYrrdwl6XNiatzzc4=; b=QJ5YbWbKXZKuvXZtqlCKzdK65t
Kwc+F3zfyOrgF+duDIotUcrlHR9ofFrdlWG8a6LUJUDsUBDzzVuH/ZwyBWBCD3aLE46WfizO6xugH
f8d+m/dlhNhOqz8Wi26QNoJhJX7DM9TQfxppmeuur8ka/0jionSSAuGIiawwQEQdEw7Xp3EZN//qi
TC+Ms9axyxtNTKyDKnlsnTnIilP3MGop0m+Dp8DzyS5hiRi8UoDpnOxe/I6Ge7GOKiWNMnFey0cDq
cLTsGLmNc1QiIGYK1fao3Z3ZkZpE0p5F/1EvlwHtXEVwHzmkf317KEcjXj0U7Y6Ns1OJOt84ww4cc
y4KA6elQ==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFheT-00026c-Hz; Thu, 25 Oct 2018 15:34:25 +0000
Received: from mout.kundenserver.de ([212.227.126.130])
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhae-0000Ke-Qh; Thu, 25 Oct 2018 15:30:34 +0000
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1MF3U0-1gMIEz0n1s-00FWtg; Thu, 25 Oct 2018 17:30:09 +0200
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1MF3U0-1gMIEz0n1s-00FWtg; Thu, 25 Oct 2018 17:30:09 +0200
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>, gregkh@linuxfoundation.org,
Dave Stevenson <dave.stevenson@raspberrypi.org>
Subject: [PATCH RFC 07/11] staging: bcm2835-audio: Enable compile test
Date: Thu, 25 Oct 2018 17:29:31 +0200
Message-Id: <1540481375-15952-8-git-send-email-stefan.wahren@i2se.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
References: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
X-Provags-ID: V03:K1:pGp0GjXgsiJJjrZIoTdokzUb4amG+8i7NGn+Y/BPM3GZUTudl5r
XrmHWCk55A1BU/hL9RioxjTmACK1mpwbrjYojLrKedKZfwPpegWMIIgV3/Lsto6tmLyOytV
mtX3ozndc5Lz6AtTtFMhlgOXn0IpyehVHG/bNonyV8vM7HABf9iDxO8qjinu1Ks0VTvFLlw
7jC/2S/6CBs3xOC+NPRNg==
X-UI-Out-Filterresults: notjunk:1;V01:K0:e1Bk1RphuD4=:2RNuGVXaGV7E66QCn/5kSs
KZzKOmmMbfSv4D5GFw/mT+Dcl8hUFjeFmUOBcA3fY2wAbXOEDUEK2F350NE9M7OUCgb5HWCb6
BkgNT2udFhLBOdNr7vwCyWhSVMdTfBUaTKvC7N9VBQd7K1rhYPzyuHLb0YM4og0Z/UURHJ+Ml
zrxcUFWlfUP/MLA+1cGo8IjMNU9ydghJ6VROor8ntJRgFrEcd3oQqROK7Z/C9lfCzwtfGyjxK
SmU3QaUkujYcNq4/GvusaKvgiKEJFViRHRLQzFJ3oBFitE6cZ0H3uS6U2vzWTNWM/FkUhPWDp
taBkBKOSblEUN9Maf5KWH4Sm3w5rypm4DYUuTB6yawTKf2wEXGDW1k6ggU0Cv8cOP2Wrsah2z
BiMe7Xl1VQvj1jU2iVFl1djgPhFjdjJjHxQQHWJBVGEMUsRT1CRPGyHfOG7luRYzNQ8IinVK8
r1WK7yNfDRHOmxSScWbMpmSilF6kd1R/7OlmpDIZBVuVHEiinwkukFn/zSsnu1BBw2M5q+Kr0
aqv+9OKmAhMMBIMZ168EgbcWCYOnjpzNa7Vd+WrapQRB0dFZr+HusnlNXWkNg/jQPEonVtsoo
xbNAIQEJyDcPHpBA/mxgfCCb+twtl0rBrugJQwpUWwoPD81r8A+wqijHgYrHd/3DanVLRZN9J
MsaGTaCqJQlrEhVX/vviqiWi0bteFshSRMaIHnI1+q8fMjPlpdFZv2+EBVDe19JyVgzY=
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20181025_083029_184617_918CAF17
X-CRM114-Status: GOOD ( 11.88 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Cc: devel@driverdev.osuosl.org, Stefan Wahren <stefan.wahren@i2se.com>,
linux-arm-kernel@lists.infradead.org, tiwai@suse.de, mikebrady@eircom.net,
pbrobinson@gmail.com, nsaenzjulienne@suse.de,
linux-rpi-kernel@lists.infradead.org
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
Enable the compilation test for bcm2835-audio to gain more build coverage.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/staging/vc04_services/bcm2835-audio/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vc04_services/bcm2835-audio/Kconfig b/drivers/staging/vc04_services/bcm2835-audio/Kconfig
index 9f53653..62c1c8b 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/Kconfig
+++ b/drivers/staging/vc04_services/bcm2835-audio/Kconfig
@@ -1,6 +1,6 @@
config SND_BCM2835
tristate "BCM2835 Audio"
- depends on ARCH_BCM2835 && SND
+ depends on (ARCH_BCM2835 || COMPILE_TEST) && SND
select SND_PCM
select BCM2835_VCHIQ
help
From patchwork Thu Oct 25 15:29:32 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
X-Patchwork-Id: 10656105
Return-Path:
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6BDD114E2
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:46:58 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56C382BDDB
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:46:58 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id 47E2F2BDE0; Thu, 25 Oct 2018 15:46:58 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DE36C2BDDB
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:46:57 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Owner;
bh=cQ1bZNOIJOxef+yc//3jddf67yCHYKnMNQoani1C6aI=; b=DVJMaoqsWaz9Gn3lojTZHnD74e
47KvMmSULlxSyx4BiFzIiPfU3RzOx00GfFv8Kyd5wLXEJx8o1nYbKC4jbgbMC05roeUres05iepFp
B/xtPR+0Vom+i4evlhZzjm0gkgnxnFUxIAUsZGlzK+vvqlASDbLD6l31VnXB07AZTGzX3ZbOb6drp
iMrZLgXZjmdx4ksxDCt5D67rZQrnlftdcrUPljwbzys4DiAmNuxAHBwO4NN3rdUWU9z28gVpCK6eF
J53rZndSz7mk5DrY0rL2gl1W2p5lOAx6SBNY9bNYfUnMfbYFo3o1KqF7eJA1wop4gwxOWPlKbGyWx
W2iLxOog==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhqX-0002Bz-GR; Thu, 25 Oct 2018 15:46:53 +0000
Received: from mout.kundenserver.de ([212.227.126.134])
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhag-0000Yh-HO; Thu, 25 Oct 2018 15:30:50 +0000
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1MoOIi-1fmxQH2V9U-00oreG; Thu, 25 Oct 2018 17:30:09 +0200
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1MoOIi-1fmxQH2V9U-00oreG; Thu, 25 Oct 2018 17:30:09 +0200
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>, gregkh@linuxfoundation.org,
Dave Stevenson <dave.stevenson@raspberrypi.org>
Subject: [PATCH RFC 08/11] staging: bcm2835-audio: use
module_platform_driver() macro
Date: Thu, 25 Oct 2018 17:29:32 +0200
Message-Id: <1540481375-15952-9-git-send-email-stefan.wahren@i2se.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
References: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
X-Provags-ID: V03:K1:UDMmZUKNPRzCgQbgWoUnYY5WU7ggOetVGMPRS+spstWmTEp/dID
bMJ+6epM/UZhKBNAKeibjGDfrquNCH/6APmBUc6S+9thzbqbNPdWe0MVuIu8US7SIAmEJyS
+s/z9NFDLkXZzCIfJzQMkgpmTr7k/ziOeZGgjdA7xDc0Jmu13Mw7oxxsdfHyuJykAuHcjA/
2kOpvpnwZNmt6EPp3AsMw==
X-UI-Out-Filterresults: notjunk:1;V01:K0:DQ7ecbOgszU=:wFjPeYfv0Py0C5XLQv/V/H
cNa8C4ctvlJCAi88PdxcF0ROmTV4OuYxfYEQDEk73wx3ujPnBhC+GjHM4/nMBNR6AYxvV3RPr
odHTp5/JPfHBjyRtvMON2bx/mmGvGs6q007WzubrMbLgEPmv99KhdihpeTfcX/YNaaq0HJn9j
Qc58m/3TkuBnUt6QpTUoMtZ3NzhMdfEfurFfJKAx2bygZ+AZ3OZUhuVovY/kAWZNTCGqkbC2f
W8/1RTooQpRZxILxrBQD+On9ZA9sZQVjwBuNR2HwvSW3c2QUuGq80WtcMD5j3MbMDDEuR9wqQ
3EMOUfI23fzMcTaEXSc4lW0iwePqO2LN5Lpu6zNzENVuMoBC7iePseFo8s/pESO6cPKNlsLFZ
TKx8UgkUFXBHlV4RIN/p88adp53EnGo+vbYxEKq4Jj78JX0LBZfjfaPGIJnKVAWKWYa/wf22h
hNBQyTL5WeGxOlVeoRO2SyI4bw9eCkUqePNSJkCLoCaXbkroyImV69CbAVD+cyTWOtKGBO+k1
+cG3puxg/+4awQn7smWsvaiurXZz14o0pTPAH3efCeoaxqO3cEQFHmoF7fHo7EndG2WdhO/PJ
HvEDeMj5joDiPWF/FkuBheEBAsM1Ec4chKOzlKqpH9rKsmVPLyBRfTTSM4qnKiGw2qrnVsaZK
qMcupYBBeRXhnFX85WabpckR2cgYR5s6Svdw5d56Yz9WyvZqFBEw9IhrPeGRp2ijEhjc=
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20181025_083030_910418_95160F9F
X-CRM114-Status: GOOD ( 11.27 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Cc: devel@driverdev.osuosl.org, Stefan Wahren <stefan.wahren@i2se.com>,
linux-arm-kernel@lists.infradead.org, tiwai@suse.de, mikebrady@eircom.net,
pbrobinson@gmail.com, nsaenzjulienne@suse.de,
linux-rpi-kernel@lists.infradead.org
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
There is not much value behind this boilerplate, so use
module_platform_driver() instead.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
.../staging/vc04_services/bcm2835-audio/bcm2835.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
index 87d56ab..87a27fd 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
@@ -356,25 +356,7 @@ static struct platform_driver bcm2835_alsa0_driver = {
.of_match_table = snd_bcm2835_of_match_table,
},
};
-
-static int bcm2835_alsa_device_init(void)
-{
- int retval;
-
- retval = platform_driver_register(&bcm2835_alsa0_driver);
- if (retval)
- pr_err("Error registering bcm2835_audio driver %d .\n", retval);
-
- return retval;
-}
-
-static void bcm2835_alsa_device_exit(void)
-{
- platform_driver_unregister(&bcm2835_alsa0_driver);
-}
-
-late_initcall(bcm2835_alsa_device_init);
-module_exit(bcm2835_alsa_device_exit);
+module_platform_driver(bcm2835_alsa0_driver);
MODULE_AUTHOR("Dom Cobley");
MODULE_DESCRIPTION("Alsa driver for BCM2835 chip");
From patchwork Thu Oct 25 15:29:33 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
X-Patchwork-Id: 10656075
Return-Path:
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7FB1714DE
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:37:44 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D6C12BD1A
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:37:44 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id 61C762BD6B; Thu, 25 Oct 2018 15:37:44 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D68322BD1A
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:37:43 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Owner;
bh=lHBSzlhaN05wZrbTPN7o3ohOWwwUjDnTv0xIFQVkm3Q=; b=oQZ6xk76fq3DmF6HnCeh5h2eEu
hlD3GR4UtaF0fFaU+NsQVIJe3CiWGbhZcrXJoP/QGd9jHonC6E1YRSt6fPzcOtwMM2FF6qSMntb6C
WTUlwfj3eh2/8PKDL40D4vdQ39N7Wi01m6vt1hCwrGQuL/u6gQPAysFISAW23CYS1wN2FbiQpQOSY
cEtreOYw2E4NqrGUVNFlx5JH26zvuaXZ6yZoh3+zqTnoefJhFbmBb2AWRxx7gKyF+VRmesHDI2qfU
PuFpVyTVKbTr+LXzcTU0lcaSLNiVY4oe7G4kSSz1sPokN4+ARReQb2/JE4mkUVgkrpHYXlC6yACpj
B7VPl9FQ==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhha-0004eC-RY; Thu, 25 Oct 2018 15:37:38 +0000
Received: from mout.kundenserver.de ([212.227.126.131])
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhag-0000T2-5b; Thu, 25 Oct 2018 15:30:50 +0000
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1MS43X-1g9Hh449gx-00TT1D; Thu, 25 Oct 2018 17:30:10 +0200
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1MS43X-1g9Hh449gx-00TT1D; Thu, 25 Oct 2018 17:30:10 +0200
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>, gregkh@linuxfoundation.org,
Dave Stevenson <dave.stevenson@raspberrypi.org>
Subject: [PATCH RFX 09/11] staging: bcm2835-audio: Drop DT dependency
Date: Thu, 25 Oct 2018 17:29:33 +0200
Message-Id: <1540481375-15952-10-git-send-email-stefan.wahren@i2se.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
References: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
X-Provags-ID: V03:K1:YsEVD03T8+51mvwe3093vHIL0A5idBFtaPS5ZzPz1WAWqKvQoOe
At4qoCwMd3tHwdOMLKWoIte3mupPIOoY7nKM6uPdPSJFxQZJ5axmtdSd1YACaL4MyhOumVk
VDN+524AWLN6FTGx9tOAE0ZZ483Rt8nN6k8E4v1g3r5rvedzsUErIdXS0C4f776rC/B6mWX
ExnAas95A8/csSoHr5F3g==
X-UI-Out-Filterresults: notjunk:1;V01:K0:5w+5bzc7iBQ=:7ubv64idFE+gcm1xSzP4jr
YFkCXwzaQIO26VYxPNtfMj0/LyjNj+ZdwSUFkSQ05aRfvhfBRyonEx0zRrJIiIsR9+iWn9Q4j
ORHFnZ4j+g6BFkHfAWIyli265hC3rdT/d2320btcqT4x/N32Vp1+4r1zfKSWMzGUrS3YZqXed
8q1t922IVq8946wFT+pJtWFdoK2p2XqqG/CVsxZGcFQNGRNv0H47BPFwuikBAQxD8FkYGw26a
Wp6U2av1yTP+VAW+YoHZ/diO8Rjp3W+basdnRijo6ruku8qtg8P1G5jlz4qSzfPGf/cLwKGS/
2X/As2lmmv/gZg6xsvN50h+RxgJbVG6tpo2oDTAUgIV/GVVDKEb+28pmuVAP5BuJC9yiZb2v2
24TcGWO8gx9WzAuxTcKDcpQjOQUCK0WX6qSLAiObHmLmR4TwFALMIIt8f1hcaUFOKn3wc+EoQ
TSCB0fZDfPjtjuLq/b4IwEApLtjvqMO/7AokWY4lLoEq9+1t0PqNhi9LwHSP/hhnG0NYoZWcJ
V2Mq8bCnLh70ct/KEUwpJ7nU4/vT6pZN1T7pYgJonQ/YvZhLX0kOZDUV2zkWSxZqp0NtZJH7Q
Js2cyDXTG08zBukbOEkdeD/QlDGUV6AK0P4iPoO7omfgzPRzJXuz40OuatHo/M4BL64jb8snF
R+KJN03QH4N5mMx5pkF3v4gGbYbz4lyUZNQ8utc/G3js1YTUrkkhPlINCDP5v0/AaWQg=
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20181025_083030_540870_3C868BAB
X-CRM114-Status: GOOD ( 15.53 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Cc: devel@driverdev.osuosl.org, Stefan Wahren <stefan.wahren@i2se.com>,
linux-arm-kernel@lists.infradead.org, tiwai@suse.de, mikebrady@eircom.net,
pbrobinson@gmail.com, nsaenzjulienne@suse.de,
linux-rpi-kernel@lists.infradead.org
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
Just like the bcm2835-video make this a platform driver which is probed
by vchiq. In order to change the number of channels use a module
parameter instead, but use the maximum as default.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
.../staging/vc04_services/bcm2835-audio/bcm2835.c | 41 ++++++++++------------
1 file changed, 19 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
index 87a27fd..5c5b600 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
@@ -4,15 +4,17 @@
#include <linux/platform_device.h>
#include <linux/init.h>
+#include <linux/dma-mapping.h>
+#include <linux/of_device.h>
#include <linux/slab.h>
#include <linux/module.h>
-#include <linux/of.h>
#include "bcm2835.h"
static bool enable_hdmi;
static bool enable_headphones;
static bool enable_compat_alsa = true;
+static int num_channels = MAX_SUBSTREAMS;
module_param(enable_hdmi, bool, 0444);
MODULE_PARM_DESC(enable_hdmi, "Enables HDMI virtual audio device");
@@ -21,6 +23,8 @@ MODULE_PARM_DESC(enable_headphones, "Enables Headphones virtual audio device");
module_param(enable_compat_alsa, bool, 0444);
MODULE_PARM_DESC(enable_compat_alsa,
"Enables ALSA compatibility virtual audio device");
+module_param(num_channels, int, 0644);
+MODULE_PARM_DESC(num_channels, "Number of audio channels (default: 8)");
static void bcm2835_devm_free_vchi_ctx(struct device *dev, void *res)
{
@@ -293,31 +297,30 @@ static int snd_add_child_devices(struct device *device, u32 numchans)
return 0;
}
-static int snd_bcm2835_alsa_probe_dt(struct platform_device *pdev)
+static int snd_bcm2835_alsa_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- u32 numchans;
int err;
- err = of_property_read_u32(dev->of_node, "brcm,pwm-channels",
- &numchans);
- if (err) {
- dev_err(dev, "Failed to get DT property 'brcm,pwm-channels'");
- return err;
+ if (num_channels <= 0 || num_channels > MAX_SUBSTREAMS) {
+ num_channels = MAX_SUBSTREAMS;
+ dev_warn(dev, "Illegal num_channels value, will use %u\n",
+ num_channels);
}
- if (numchans == 0 || numchans > MAX_SUBSTREAMS) {
- numchans = MAX_SUBSTREAMS;
- dev_warn(dev,
- "Illegal 'brcm,pwm-channels' value, will use %u\n",
- numchans);
+ dev->coherent_dma_mask = DMA_BIT_MASK(32);
+ dev->dma_mask = &dev->coherent_dma_mask;
+ err = of_dma_configure(dev, NULL, true);
+ if (err) {
+ dev_err(dev, "Unable to setup DMA: %d\n", err);
+ return err;
}
err = bcm2835_devm_add_vchi_ctx(dev);
if (err)
return err;
- err = snd_add_child_devices(dev, numchans);
+ err = snd_add_child_devices(dev, num_channels);
if (err)
return err;
@@ -339,21 +342,14 @@ static int snd_bcm2835_alsa_resume(struct platform_device *pdev)
#endif
-static const struct of_device_id snd_bcm2835_of_match_table[] = {
- { .compatible = "brcm,bcm2835-audio",},
- {},
-};
-MODULE_DEVICE_TABLE(of, snd_bcm2835_of_match_table);
-
static struct platform_driver bcm2835_alsa0_driver = {
- .probe = snd_bcm2835_alsa_probe_dt,
+ .probe = snd_bcm2835_alsa_probe,
#ifdef CONFIG_PM
.suspend = snd_bcm2835_alsa_suspend,
.resume = snd_bcm2835_alsa_resume,
#endif
.driver = {
.name = "bcm2835_audio",
- .of_match_table = snd_bcm2835_of_match_table,
},
};
module_platform_driver(bcm2835_alsa0_driver);
@@ -361,3 +357,4 @@ module_platform_driver(bcm2835_alsa0_driver);
MODULE_AUTHOR("Dom Cobley");
MODULE_DESCRIPTION("Alsa driver for BCM2835 chip");
MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:bcm2835_audio");
From patchwork Thu Oct 25 15:29:34 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
X-Patchwork-Id: 10656077
Return-Path:
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A013414DE
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:38:21 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A77629F82
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:38:21 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id 7D6002B0AD; Thu, 25 Oct 2018 15:38:21 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BDC6E2B674
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:38:20 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Owner;
bh=Olh7Xsf5+A/G0ePZja6YTc1fKKlcqZRNYiqLWlJAUfY=; b=VBjOHgzlTungtS+GiCJpYytDR2
o9G9DLzuqRo8rRUUq0jNHJNltCFQDNTEqvHMAMlNDj9Z5lz9TyRHJ67dmYlbSjFKlcRi0/SWy+6iQ
E0sJOZcRe7+w6rbyKL8D4CTNa3shUVQ3MwQ+SHmPlbIvxgRiWFaJ2JZw0NA01517D8Cf2AkuQGRE+
4mUwJffj9ggjdccoUzFYLkrW2YIimpO2v0bdmpxJTjMz9GeNI2z61+W1cvtQCr1wk3yAjSmzvaa4z
T5hH4Ickz9PurzbakNjTkTVV4Bcv15pi392mMK2MyPsb6mupB6ZhvGoeOK9NZv73y37PLujKCso8q
5rhUnmuw==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhiC-0004wo-Rb; Thu, 25 Oct 2018 15:38:16 +0000
Received: from mout.kundenserver.de ([212.227.126.134])
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhag-0000Yi-HO; Thu, 25 Oct 2018 15:31:06 +0000
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1N9dg5-1fTuT91kcH-015ZBh; Thu, 25 Oct 2018 17:30:10 +0200
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1N9dg5-1fTuT91kcH-015ZBh; Thu, 25 Oct 2018 17:30:10 +0200
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>, gregkh@linuxfoundation.org,
Dave Stevenson <dave.stevenson@raspberrypi.org>
Subject: [PATCH RFC 10/11] staging: bcm2835-camera: Provide more specific
probe error messages
Date: Thu, 25 Oct 2018 17:29:34 +0200
Message-Id: <1540481375-15952-11-git-send-email-stefan.wahren@i2se.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
References: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
X-Provags-ID: V03:K1:hLFz0DajoKrTtygjjPrDNaA3I6RUW7+JtkQY4EZzcN4+eqE57T0
wH1Td/EEeqBD4ybkajz3rJlM7asjXaAHuuGiToidUKYI3ve7N01H1TSLNnEeqXtd1Wfs7Ew
Sc3Kioe34pPFEJOq7dCiuRt0hp/ik4ZMG35lnTGyQhKTeREpqvms5kq8LWb430S+7X2rKhS
9ZV5Z9SQD34Rug1RkAh3Q==
X-UI-Out-Filterresults: notjunk:1;V01:K0:mC2y9c6LUIc=:26cbKrq0e92ADdJCgexLfQ
baH3YRrgdQ6MvmzkaJJ56MEes+RUtTahwJ4YBulCJhyBlZJaF0ibaf17oSZVbULNZj74anvHt
xIEhuvQQYMfjEX2WSslYdtVin7MEY9V7Lm6nO581PzpC70EpF8x20wc3lTk0OEqpZtoem2xpI
zTqPkBKxGcwIVl9h0TWM55EbDE9GAbXsCvu9FzjahFwCaG08YEKf65S6goVd1L03NJhn3puSw
qVs3DhJm5Kdxwk8s4rpNM7vGzIgJXuu8VTbx0c/DFJLWLcGNcKhAWJe+U6ZGJ4yR4QGj5A69j
0Ood5v0ucLVaWivHisLe9uOWt5S6N0J7Q0gDtGP6lDNJAbUwBZnPdcHr9Ge42PpZAmnV+QU/c
nBTJc8wjkVU6etYTha4sIVSMERHiwnICe4ka/PQtgG4hFRIfiCW/QgkBLG1V7akk9rkhhXjRZ
/Jppx3cc+g65+UExTyliB9Ny8u4aQIksKP55vDXGGsMM2gRMA1+CWnrFllKPTOu5wQxiQBS3j
N7cOm1fdsNbBw7l4MCUYYmrbOm/aaKu1Q8MUmj8TaYeSoShM3prtOZsFUnkeWmkR8fcyS9RnT
b9MSOY/jPYHe/YoSiEsMWDen9n/Yon4o+CTlTzep5nac1xEiGnauxqIOxMojZ6wDwrPzYcocc
QifuV12x6PQtuyz8pqGcq2cDtWgckr9NQBQlBMQSZIjLBObpYzMfHf+o/eOlqFDSybVk=
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20181025_083030_911887_F39F581E
X-CRM114-Status: GOOD ( 16.32 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Cc: devel@driverdev.osuosl.org, Stefan Wahren <stefan.wahren@i2se.com>,
linux-arm-kernel@lists.infradead.org, tiwai@suse.de, mikebrady@eircom.net,
pbrobinson@gmail.com, nsaenzjulienne@suse.de,
linux-rpi-kernel@lists.infradead.org
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
Currently there is only a catch-all info message which print the
relevant error code without any context. So add more specific error
messages in order to narrow down possible issues.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
.../vc04_services/bcm2835-camera/bcm2835-camera.c | 58 +++++++++++++++-------
1 file changed, 39 insertions(+), 19 deletions(-)
diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index cd773eb..84ca22d 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -1539,8 +1539,11 @@ static int mmal_init(struct bm2835_mmal_dev *dev)
struct vchiq_mmal_component *camera;
ret = vchiq_mmal_init(&dev->instance);
- if (ret < 0)
+ if (ret < 0) {
+ v4l2_err(&dev->v4l2_dev, "%s: vchiq mmal init failed %d\n",
+ __func__, ret);
return ret;
+ }
/* get the camera component ready */
ret = vchiq_mmal_component_init(dev->instance, "ril.camera",
@@ -1549,7 +1552,9 @@ static int mmal_init(struct bm2835_mmal_dev *dev)
goto unreg_mmal;
camera = dev->component[MMAL_COMPONENT_CAMERA];
- if (camera->outputs < MMAL_CAMERA_PORT_COUNT) {
+ if (camera->outputs < MMAL_CAMERA_PORT_COUNT) {
+ v4l2_err(&dev->v4l2_dev, "%s: too few camera outputs %d needed %d\n",
+ __func__, camera->outputs, MMAL_CAMERA_PORT_COUNT);
ret = -EINVAL;
goto unreg_camera;
}
@@ -1557,8 +1562,11 @@ static int mmal_init(struct bm2835_mmal_dev *dev)
ret = set_camera_parameters(dev->instance,
camera,
dev);
- if (ret < 0)
+ if (ret < 0) {
+ v4l2_err(&dev->v4l2_dev, "%s: unable to set camera parameters: %d\n",
+ __func__, ret);
goto unreg_camera;
+ }
/* There was an error in the firmware that meant the camera component
* produced BGR instead of RGB.
@@ -1647,8 +1655,8 @@ static int mmal_init(struct bm2835_mmal_dev *dev)
if (dev->component[MMAL_COMPONENT_PREVIEW]->inputs < 1) {
ret = -EINVAL;
- pr_debug("too few input ports %d needed %d\n",
- dev->component[MMAL_COMPONENT_PREVIEW]->inputs, 1);
+ v4l2_err(&dev->v4l2_dev, "%s: too few input ports %d needed %d\n",
+ __func__, dev->component[MMAL_COMPONENT_PREVIEW]->inputs, 1);
goto unreg_preview;
}
@@ -1661,8 +1669,8 @@ static int mmal_init(struct bm2835_mmal_dev *dev)
if (dev->component[MMAL_COMPONENT_IMAGE_ENCODE]->inputs < 1) {
ret = -EINVAL;
- v4l2_err(&dev->v4l2_dev, "too few input ports %d needed %d\n",
- dev->component[MMAL_COMPONENT_IMAGE_ENCODE]->inputs,
+ v4l2_err(&dev->v4l2_dev, "%s: too few input ports %d needed %d\n",
+ __func__, dev->component[MMAL_COMPONENT_IMAGE_ENCODE]->inputs,
1);
goto unreg_image_encoder;
}
@@ -1676,8 +1684,8 @@ static int mmal_init(struct bm2835_mmal_dev *dev)
if (dev->component[MMAL_COMPONENT_VIDEO_ENCODE]->inputs < 1) {
ret = -EINVAL;
- v4l2_err(&dev->v4l2_dev, "too few input ports %d needed %d\n",
- dev->component[MMAL_COMPONENT_VIDEO_ENCODE]->inputs,
+ v4l2_err(&dev->v4l2_dev, "%s: too few input ports %d needed %d\n",
+ __func__, dev->component[MMAL_COMPONENT_VIDEO_ENCODE]->inputs,
1);
goto unreg_vid_encoder;
}
@@ -1706,8 +1714,11 @@ static int mmal_init(struct bm2835_mmal_dev *dev)
sizeof(enable));
}
ret = bm2835_mmal_set_all_camera_controls(dev);
- if (ret < 0)
+ if (ret < 0) {
+ v4l2_err(&dev->v4l2_dev, "%s: failed to set all camera controls: %d\n",
+ __func__, ret);
goto unreg_vid_encoder;
+ }
return 0;
@@ -1873,21 +1884,29 @@ static int bcm2835_mmal_probe(struct platform_device *pdev)
snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name),
"%s", BM2835_MMAL_MODULE_NAME);
ret = v4l2_device_register(NULL, &dev->v4l2_dev);
- if (ret)
+ if (ret) {
+ dev_err(&pdev->dev, "%s: could not register V4L2 device: %d\n",
+ __func__, ret);
goto free_dev;
+ }
/* setup v4l controls */
ret = bm2835_mmal_init_controls(dev, &dev->ctrl_handler);
- if (ret < 0)
+ if (ret < 0) {
+ v4l2_err(&dev->v4l2_dev, "%s: could not init controls: %d\n",
+ __func__, ret);
goto unreg_dev;
+ }
dev->v4l2_dev.ctrl_handler = &dev->ctrl_handler;
/* mmal init */
dev->instance = instance;
ret = mmal_init(dev);
- if (ret < 0)
+ if (ret < 0) {
+ v4l2_err(&dev->v4l2_dev, "%s: mmal init failed: %d\n",
+ __func__, ret);
goto unreg_dev;
-
+ }
/* initialize queue */
q = &dev->capture.vb_vidq;
memset(q, 0, sizeof(*q));
@@ -1905,16 +1924,19 @@ static int bcm2835_mmal_probe(struct platform_device *pdev)
/* initialise video devices */
ret = bm2835_mmal_init_device(dev, &dev->vdev);
- if (ret < 0)
+ if (ret < 0) {
+ v4l2_err(&dev->v4l2_dev, "%s: could not init device: %d\n",
+ __func__, ret);
goto unreg_dev;
+ }
/* Really want to call vidioc_s_fmt_vid_cap with the default
* format, but currently the APIs don't join up.
*/
ret = mmal_setup_components(dev, &default_v4l2_format);
if (ret < 0) {
- v4l2_err(&dev->v4l2_dev,
- "%s: could not setup components\n", __func__);
+ v4l2_err(&dev->v4l2_dev, "%s: could not setup components: %d\n",
+ __func__, ret);
goto unreg_dev;
}
@@ -1938,8 +1960,6 @@ static int bcm2835_mmal_probe(struct platform_device *pdev)
bcm2835_cleanup_instance(gdev[i]);
gdev[i] = NULL;
}
- pr_info("%s: error %d while loading driver\n",
- BM2835_MMAL_MODULE_NAME, ret);
cleanup_mmal:
vchiq_mmal_finalise(instance);
From patchwork Thu Oct 25 15:29:35 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Stefan Wahren <stefan.wahren@i2se.com>
X-Patchwork-Id: 10656057
Return-Path:
<linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 43EF714DE
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:34:03 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 322262BD1A
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:34:03 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id 257912BD81; Thu, 25 Oct 2018 15:34:03 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C36612BD1A
for <patchwork-linux-arm@patchwork.kernel.org>;
Thu, 25 Oct 2018 15:34:02 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:
List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:
In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Owner;
bh=uFHfQUxOTO7S/FScNKIV35wbwjyqyBTU6tCN9uQO8y0=; b=C4xdZknyGCFYKC2O1jLA3uns9i
blxn9i5qFrq8VWlAIoPmmppiTmwdMTSTsl5JEzxmO+1SlHqfB9PJ/9bOAlED/nz2tI80GHwvvNHLF
Vt2U2XkJG02Bg+lEtsn2rqpq0OzaoDsv61uTiA9PsDl+5V429m+eEyYukS4dfgkYxseG5QAgTLAV9
ifd8vxrpNY+WVrJg9acf/rddKLlgcNjL3GRY+Uw6VyeOWlKay6RIfVjlVOlolRDJ6m739t7hqdo+E
hlUIBH4dFmKW8nXrP3b7HdGkapU5WW+c0pTE+GzEWzAFRrjj+U6zwJVOIdUW0eZyTetssvoG6RTRC
sbrh+NOQ==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhdq-0001qT-7b; Thu, 25 Oct 2018 15:33:46 +0000
Received: from mout.kundenserver.de ([212.227.126.130])
by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
id 1gFhae-0000Q6-R9; Thu, 25 Oct 2018 15:30:33 +0000
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1N0WsG-1fLQ8s3Z9o-00wSNs; Thu, 25 Oct 2018 17:30:10 +0200
Received: from localhost.localdomain ([37.4.249.153]) by
mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis)
id 1N0WsG-1fLQ8s3Z9o-00wSNs; Thu, 25 Oct 2018 17:30:10 +0200
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>, gregkh@linuxfoundation.org,
Dave Stevenson <dave.stevenson@raspberrypi.org>
Subject: [PATCH RFC 11/11] staging: bcm2835-camera: Add hint about possible
faulty config
Date: Thu, 25 Oct 2018 17:29:35 +0200
Message-Id: <1540481375-15952-12-git-send-email-stefan.wahren@i2se.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
References: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>
X-Provags-ID: V03:K1:NRZtoAxO4KuB2XxhzFli1zm+3tWWFlCmYHnv5FFzBG1a6vRhTKj
NZktF717FC1kOsEt0Wo62etCCH/b7Tjmg2s3HvA7OUYCNyailz9BocAmP27vYDD8Fh8vRlS
E0IkMw2u0X67smI5fC3NlHfOL73gTAJ76u8Ml5z3S4ch4D20snCkUpEi26edMPn6WqNEXnA
Hto1pobYtndgG9uWreJrA==
X-UI-Out-Filterresults: notjunk:1;V01:K0:eC8qlffpHwg=:WD2ZTiXk2RfdEBG8JTkAn5
Csjof/x/6e4u4+YcpI4/M742FyOuogauXE1NgZMOLUxksPEET4xlxrOkED3zAompxKMSUuwnK
Vz2upIliDVnW2y9lljonWyMl2inFVFp+/eLpOGVP6H7imQaPIPW+fXp7RUmkyuXOYTkllVVgj
v6aUJuSERgX3+e5LSqz27p2gNfWXaYds+GNBgbW6FDQPLC3pcE+E0WEtYRY3+Dp8FjqdImAnI
7MfAQuT+MJiNunNyu8k29HPY93Sa9Yt2JL+IWaHksz/QGGd2I1VvSj1NGq2nO8Gp90ZqQNQz+
Uf1cf1FstPnvwnEUg+kyEWL2vOQeiBteV0tWdRimD2vOnsDRV5r9pfod5CGWFrV+U7DvVFhTw
h0NEvQEzm+QoUP1S/chFvN9A4+96rdZJ5HpZu/5frt5rbNtY+08jlTWj71dm0NdGWPEu7m/m+
O0PHN580SkLZxbHJu1AW9wxK7aRwj+im01FjJUjjsGc3hBMDtJgL04bkba6TgEsdDbg7SmmYd
K1d1HObsMz0VY5b3lj95S/loDpPQ9lKcRK1Tgw1l3dqYG3LXej3+Bh+N7jSiDAr2QCyvTfraK
KBKixQ/6xh5kii2QMFVplRVuz7l6T4N8XxLzHaBuBSXOwucAJk5J8rZ+uBtyCMFt705yqOcFL
p7N9OWJMeraBFmkzO43l40Z9U4+iBbe/RAjdl9akUiobbRAdq+99Wljhqgn4k8abICDc=
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20181025_083029_201443_F3D80824
X-CRM114-Status: GOOD ( 12.71 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Cc: devel@driverdev.osuosl.org, Stefan Wahren <stefan.wahren@i2se.com>,
linux-arm-kernel@lists.infradead.org, tiwai@suse.de, mikebrady@eircom.net,
pbrobinson@gmail.com, nsaenzjulienne@suse.de,
linux-rpi-kernel@lists.infradead.org
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Virus-Scanned: ClamAV using ClamSMTP
As per default the GPU memory config of the Raspberry Pi isn't sufficient
for the camera usage. Even worse the bcm2835 camera driver doesn't provide a
helpful error message in this case. So let's add a hint to point the user
to the likely cause.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
index cc2d993..bffd75d 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
@@ -1623,8 +1623,11 @@ int vchiq_mmal_component_init(struct vchiq_mmal_instance *instance,
component = &instance->component[instance->component_idx];
ret = create_component(instance, component, name);
- if (ret < 0)
+ if (ret < 0) {
+ pr_err("%s: failed to create component %d (Not enough GPU mem?)\n",
+ __func__, ret);
goto unlock;
+ }
/* ports info needs gathering */
component->control.type = MMAL_PORT_TYPE_CONTROL;
|