diff options
| author | David E. Box <[email protected]> | 2025-07-03 02:28:17 +0000 |
|---|---|---|
| committer | Ilpo Järvinen <[email protected]> | 2025-07-03 08:09:20 +0000 |
| commit | dc957ab6aa05c118c3da0542428a4d6602aa2d2d (patch) | |
| tree | fa8cd82a50fd037fe36afc41286b598911b064ce /drivers/platform/x86/intel/vsec.c | |
| parent | MAINTAINERS: Add link to documentation of Intel PMT ABI (diff) | |
| download | kernel-dc957ab6aa05c118c3da0542428a4d6602aa2d2d.tar.gz kernel-dc957ab6aa05c118c3da0542428a4d6602aa2d2d.zip | |
platform/x86/intel/vsec: Add private data for per-device data
Introduce a new private structure, struct vsec_priv, to hold a pointer to
the platform-specific information. Although the driver didn’t previously
require this per-device data, adding it now lays the groundwork for
upcoming patches that will manage such data. No functional changes.
Signed-off-by: David E. Box <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Ilpo Järvinen <[email protected]>
Diffstat (limited to 'drivers/platform/x86/intel/vsec.c')
| -rw-r--r-- | drivers/platform/x86/intel/vsec.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/platform/x86/intel/vsec.c b/drivers/platform/x86/intel/vsec.c index 055ca9f48fb4..59fb6568a855 100644 --- a/drivers/platform/x86/intel/vsec.c +++ b/drivers/platform/x86/intel/vsec.c @@ -32,6 +32,10 @@ static DEFINE_IDA(intel_vsec_ida); static DEFINE_IDA(intel_vsec_sdsi_ida); static DEFINE_XARRAY_ALLOC(auxdev_array); +struct vsec_priv { + struct intel_vsec_platform_info *info; +}; + static const char *intel_vsec_name(enum intel_vsec_id id) { switch (id) { @@ -348,6 +352,7 @@ EXPORT_SYMBOL_NS_GPL(intel_vsec_register, "INTEL_VSEC"); static int intel_vsec_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) { struct intel_vsec_platform_info *info; + struct vsec_priv *priv; bool have_devices = false; int ret; @@ -360,6 +365,13 @@ static int intel_vsec_pci_probe(struct pci_dev *pdev, const struct pci_device_id if (!info) return -EINVAL; + priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + priv->info = info; + pci_set_drvdata(pdev, priv); + if (intel_vsec_walk_dvsec(pdev, info)) have_devices = true; |
