For the I/O operations executed from the probe() method, take advantage
of Devres::access(), avoiding the atomic check and RCU read lock required
otherwise entirely.
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com>
Link: https://lore.kernel.org/r/20250428140137.468709-4-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
GFP_KERNEL,
)?;
- let res = drvdata
- .bar
- .try_access_with(|b| Self::testdev(info, b))
- .ok_or(ENXIO)??;
-
- dev_info!(pdev.as_ref(), "pci-testdev data-match count: {}\n", res);
+ let bar = drvdata.bar.access(pdev.as_ref())?;
+ dev_info!(
+ pdev.as_ref(),
+ "pci-testdev data-match count: {}\n",
+ Self::testdev(info, bar)?
+ );
Ok(drvdata.into())
}