Commit 14891af
iommu: Move the iommu driver sysfs setup into iommu_init/deinit_device()
It makes logical sense that once the driver is attached to the device the
sysfs links appear, even if we haven't fully created the group_device or
attached the device to a domain.
Fix the missing error handling on sysfs creation since
iommu_init_device() can trivially handle this.
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/6-v3-328044aa278c+45e49-iommu_probe_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>1 parent aa09585 commit 14891af
2 files changed
Lines changed: 9 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | 110 | | |
114 | 111 | | |
115 | 112 | | |
| |||
126 | 123 | | |
127 | 124 | | |
128 | 125 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | 126 | | |
133 | 127 | | |
134 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
359 | 363 | | |
360 | 364 | | |
361 | 365 | | |
362 | 366 | | |
363 | 367 | | |
364 | | - | |
| 368 | + | |
365 | 369 | | |
366 | 370 | | |
367 | 371 | | |
| |||
371 | 375 | | |
372 | 376 | | |
373 | 377 | | |
| 378 | + | |
| 379 | + | |
374 | 380 | | |
375 | 381 | | |
376 | 382 | | |
| |||
388 | 394 | | |
389 | 395 | | |
390 | 396 | | |
| 397 | + | |
| 398 | + | |
391 | 399 | | |
392 | 400 | | |
393 | 401 | | |
| |||
462 | 470 | | |
463 | 471 | | |
464 | 472 | | |
465 | | - | |
466 | 473 | | |
467 | 474 | | |
468 | 475 | | |
| |||
584 | 591 | | |
585 | 592 | | |
586 | 593 | | |
587 | | - | |
588 | | - | |
589 | 594 | | |
590 | 595 | | |
591 | 596 | | |
| |||
0 commit comments