diff options
| author | Antti Laakso <antti.laakso@linux.intel.com> | 2026-08-27 15:32:58 +0300 |
|---|---|---|
| committer | Sakari Ailus <sakari.ailus@linux.intel.com> | 2026-09-04 14:46:49 +0300 |
| commit | 9d03c3569fdbe0c450de6c732e7ffd4d4ec0ff29 (patch) | |
| tree | 1651f614b3e686818bd6d996a5d31542510149f9 | |
| parent | ef09c6c2c96beaf3f204c6da9f3c4e686c13cae4 (diff) | |
| download | linux-next-9d03c3569fdbe0c450de6c732e7ffd4d4ec0ff29.tar.gz linux-next-9d03c3569fdbe0c450de6c732e7ffd4d4ec0ff29.zip | |
media: ipu6: Cleanup ipu6_mmu_init()
The struct ipu6_mmu_pdata is used only in ipu6_mmu_init(),
and not really needed, remove it.
Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
| -rw-r--r-- | drivers/media/pci/intel/ipu6/ipu6-mmu.c | 13 | ||||
| -rw-r--r-- | drivers/media/pci/intel/ipu6/ipu6.h | 6 |
2 files changed, 6 insertions, 13 deletions
diff --git a/drivers/media/pci/intel/ipu6/ipu6-mmu.c b/drivers/media/pci/intel/ipu6/ipu6-mmu.c index 0e6dca36b6ba..6b1a49ebbcc2 100644 --- a/drivers/media/pci/intel/ipu6/ipu6-mmu.c +++ b/drivers/media/pci/intel/ipu6/ipu6-mmu.c @@ -750,27 +750,26 @@ struct ipu6_mmu *ipu6_mmu_init(struct device *dev, const struct ipu6_hw_variants *hw) { struct ipu6_device *isp = pci_get_drvdata(to_pci_dev(dev)); - struct ipu6_mmu_pdata *pdata; + struct ipu6_mmu_hw *mmu_hw; struct ipu6_mmu *mmu; unsigned int i; if (hw->nr_mmus > IPU6_MMU_MAX_DEVICES) return ERR_PTR(-EINVAL); - pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); - if (!pdata) + mmu_hw = devm_kcalloc(dev, sizeof(*mmu_hw), hw->nr_mmus, GFP_KERNEL); + if (!mmu_hw) return ERR_PTR(-ENOMEM); for (i = 0; i < hw->nr_mmus; i++) { - struct ipu6_mmu_hw *pdata_mmu = &pdata->mmu_hw[i]; const struct ipu6_mmu_hw *src_mmu = &hw->mmu_hw[i]; if (src_mmu->nr_l1streams > IPU6_MMU_MAX_TLB_L1_STREAMS || src_mmu->nr_l2streams > IPU6_MMU_MAX_TLB_L2_STREAMS) return ERR_PTR(-EINVAL); - *pdata_mmu = *src_mmu; - pdata_mmu->base = base + src_mmu->offset; + mmu_hw[i] = *src_mmu; + mmu_hw[i].base = base + src_mmu->offset; } mmu = devm_kzalloc(dev, sizeof(*mmu), GFP_KERNEL); @@ -778,7 +777,7 @@ struct ipu6_mmu *ipu6_mmu_init(struct device *dev, return ERR_PTR(-ENOMEM); mmu->mmid = mmid; - mmu->mmu_hw = pdata->mmu_hw; + mmu->mmu_hw = mmu_hw; mmu->nr_mmus = hw->nr_mmus; mmu->tlb_invalidate = tlb_invalidate; mmu->ready = false; diff --git a/drivers/media/pci/intel/ipu6/ipu6.h b/drivers/media/pci/intel/ipu6/ipu6.h index 07ca59048f44..874b377a2e9a 100644 --- a/drivers/media/pci/intel/ipu6/ipu6.h +++ b/drivers/media/pci/intel/ipu6/ipu6.h @@ -239,12 +239,6 @@ struct ipu6_mmu_hw { bool insert_read_before_invalidate; }; -struct ipu6_mmu_pdata { - u32 nr_mmus; - struct ipu6_mmu_hw mmu_hw[IPU6_MMU_MAX_DEVICES]; - int mmid; -}; - struct ipu6_isys_csi2_pdata { void __iomem *base; }; |
