summaryrefslogtreecommitdiff
path: root/src/lib/reg_script.c
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2018-12-05 11:03:36 +0100
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-01-04 12:11:18 +0000
commitf9e47cc4c2ddefaaa91ddae25449803cdd5243b8 (patch)
treef7023399c4eb45a4f8dbcc47c42ecb7c7c78ab33 /src/lib/reg_script.c
parent4139c15276a62c32c8d976c41782073379d64585 (diff)
downloadcoreboot-f9e47cc4c2ddefaaa91ddae25449803cdd5243b8.tar.xz
src: Get rid of device_t
Use of device_t is deprecated. Change-Id: Ie05869901ac33d7089e21110f46c1241f7ee731f Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/30047 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/lib/reg_script.c')
-rw-r--r--src/lib/reg_script.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/reg_script.c b/src/lib/reg_script.c
index e84c1379b0..926a6590dc 100644
--- a/src/lib/reg_script.c
+++ b/src/lib/reg_script.c
@@ -40,8 +40,13 @@
#define EMPTY_DEV NULL
#endif
+#ifdef __SIMPLE_DEVICE__
static inline void reg_script_set_dev(struct reg_script_context *ctx,
- device_t dev)
+ pci_devfn_t dev)
+#else
+static inline void reg_script_set_dev(struct reg_script_context *ctx,
+ struct device *dev)
+#endif
{
ctx->dev = dev;
ctx->res = NULL;
@@ -677,7 +682,11 @@ static void reg_script_run_next(struct reg_script_context *prev_ctx,
reg_script_run_with_context(&ctx);
}
-void reg_script_run_on_dev(device_t dev, const struct reg_script *step)
+#ifdef __SIMPLE_DEVICE__
+void reg_script_run_on_dev(pci_devfn_t dev, const struct reg_script *step)
+#else
+void reg_script_run_on_dev(struct device *dev, const struct reg_script *step)
+#endif
{
struct reg_script_context ctx;