mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
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 <david.e.box@linux.intel.com> Link: https://lore.kernel.org/r/20250703022832.1302928-3-david.e.box@linux.intel.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
parent
fb1311b3f1
commit
dc957ab6aa
|
|
@ -32,6 +32,10 @@ static DEFINE_IDA(intel_vsec_ida);
|
||||||
static DEFINE_IDA(intel_vsec_sdsi_ida);
|
static DEFINE_IDA(intel_vsec_sdsi_ida);
|
||||||
static DEFINE_XARRAY_ALLOC(auxdev_array);
|
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)
|
static const char *intel_vsec_name(enum intel_vsec_id id)
|
||||||
{
|
{
|
||||||
switch (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)
|
static int intel_vsec_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||||
{
|
{
|
||||||
struct intel_vsec_platform_info *info;
|
struct intel_vsec_platform_info *info;
|
||||||
|
struct vsec_priv *priv;
|
||||||
bool have_devices = false;
|
bool have_devices = false;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
|
@ -360,6 +365,13 @@ static int intel_vsec_pci_probe(struct pci_dev *pdev, const struct pci_device_id
|
||||||
if (!info)
|
if (!info)
|
||||||
return -EINVAL;
|
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))
|
if (intel_vsec_walk_dvsec(pdev, info))
|
||||||
have_devices = true;
|
have_devices = true;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user