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>
This commit is contained in:
Elyes HAOUAS
2018-12-05 11:03:36 +01:00
committed by Kyösti Mälkki
parent 4139c15276
commit f9e47cc4c2
9 changed files with 65 additions and 40 deletions

View File

@@ -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;