Commit 29a269c
soundwire: intel: move to auxiliary bus
Now that the auxiliary_bus exists, there's no reason to use platform
devices as children of a PCI device any longer.
This patch refactors the code by extending a basic auxiliary device
with Intel link-specific structures that need to be passed between
controller and link levels. This refactoring is much cleaner with no
need for cross-pointers between device and link structures.
Note that the auxiliary bus API has separate init and add steps, which
requires more attention in the error unwinding paths. The main loop
needs to deal with kfree() and auxiliary_device_uninit() for the
current iteration before jumping to the common label which releases
everything allocated in prior iterations.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20210511052132.28150-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>1 parent 1ec9d2e commit 29a269c
5 files changed
Lines changed: 202 additions & 107 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
1327 | 1327 | | |
1328 | 1328 | | |
1329 | 1329 | | |
1330 | | - | |
| 1330 | + | |
1331 | 1331 | | |
1332 | | - | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
1333 | 1335 | | |
1334 | | - | |
| 1336 | + | |
| 1337 | + | |
1335 | 1338 | | |
1336 | 1339 | | |
1337 | 1340 | | |
| |||
1344 | 1347 | | |
1345 | 1348 | | |
1346 | 1349 | | |
1347 | | - | |
1348 | | - | |
| 1350 | + | |
| 1351 | + | |
1349 | 1352 | | |
1350 | 1353 | | |
1351 | 1354 | | |
1352 | 1355 | | |
1353 | 1356 | | |
1354 | | - | |
| 1357 | + | |
1355 | 1358 | | |
1356 | 1359 | | |
1357 | 1360 | | |
| |||
1384 | 1387 | | |
1385 | 1388 | | |
1386 | 1389 | | |
1387 | | - | |
| 1390 | + | |
1388 | 1391 | | |
1389 | 1392 | | |
1390 | | - | |
| 1393 | + | |
1391 | 1394 | | |
1392 | 1395 | | |
1393 | 1396 | | |
| |||
1524 | 1527 | | |
1525 | 1528 | | |
1526 | 1529 | | |
1527 | | - | |
| 1530 | + | |
1528 | 1531 | | |
1529 | | - | |
| 1532 | + | |
1530 | 1533 | | |
1531 | 1534 | | |
1532 | 1535 | | |
| |||
1542 | 1545 | | |
1543 | 1546 | | |
1544 | 1547 | | |
1545 | | - | |
1546 | | - | |
1547 | 1548 | | |
1548 | 1549 | | |
1549 | | - | |
| 1550 | + | |
1550 | 1551 | | |
1551 | | - | |
| 1552 | + | |
1552 | 1553 | | |
1553 | 1554 | | |
1554 | 1555 | | |
1555 | 1556 | | |
1556 | 1557 | | |
1557 | | - | |
| 1558 | + | |
1558 | 1559 | | |
1559 | 1560 | | |
1560 | 1561 | | |
| |||
1976 | 1977 | | |
1977 | 1978 | | |
1978 | 1979 | | |
1979 | | - | |
1980 | | - | |
1981 | | - | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
1982 | 1989 | | |
1983 | | - | |
| 1990 | + | |
1984 | 1991 | | |
1985 | | - | |
| 1992 | + | |
| 1993 | + | |
1986 | 1994 | | |
1987 | | - | |
1988 | | - | |
| 1995 | + | |
1989 | 1996 | | |
1990 | 1997 | | |
1991 | | - | |
1992 | | - | |
| 1998 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | | - | |
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
| |||
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
51 | | - | |
52 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
53 | 59 | | |
54 | 60 | | |
0 commit comments