diff options
author | Simon Glass | 2020-12-16 21:20:07 -0700 |
---|---|---|
committer | Simon Glass | 2020-12-18 20:32:21 -0700 |
commit | 8b85dfc675f12de8d04126c07f3c796965b990c2 (patch) | |
tree | 9b8d6df956b02734a1b910b0a4c072e1e80b672a /arch | |
parent | 0b2fa98aa5e5dbdac4f5e2b2f67a34cc34dcc6b8 (diff) |
dm: Avoid accessing seq directly
At present various drivers etc. access the device's 'seq' member directly.
This makes it harder to change the meaning of that member. Change access
to go through a function instead.
The drivers/i2c/lpc32xx_i2c.c file is left unchanged for now.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/include/asm/mach-imx/mxc_i2c.h | 2 | ||||
-rw-r--r-- | arch/x86/cpu/broadwell/cpu_full.c | 2 | ||||
-rw-r--r-- | arch/x86/cpu/ivybridge/model_206ax.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/include/asm/mach-imx/mxc_i2c.h b/arch/arm/include/asm/mach-imx/mxc_i2c.h index 81fd9814447..c016aa74741 100644 --- a/arch/arm/include/asm/mach-imx/mxc_i2c.h +++ b/arch/arm/include/asm/mach-imx/mxc_i2c.h @@ -42,7 +42,7 @@ struct mxc_i2c_bus { /* * board file can use this index to locate which i2c_pads_info is for * i2c_idle_bus. When pinmux is implement, this entry can be - * discarded. Here we do not use dev->seq, because we do not want to + * discarded. Here we do not use dev_seq(dev), because we do not want to * export device to board file. */ int index; diff --git a/arch/x86/cpu/broadwell/cpu_full.c b/arch/x86/cpu/broadwell/cpu_full.c index 1ff4dce0b57..ea9e98dde69 100644 --- a/arch/x86/cpu/broadwell/cpu_full.c +++ b/arch/x86/cpu/broadwell/cpu_full.c @@ -638,7 +638,7 @@ static int broadwell_get_count(const struct udevice *dev) static int cpu_x86_broadwell_probe(struct udevice *dev) { - if (dev->seq == 0) { + if (dev_seq(dev) == 0) { cpu_core_init(dev); return broadwell_init(dev); } diff --git a/arch/x86/cpu/ivybridge/model_206ax.c b/arch/x86/cpu/ivybridge/model_206ax.c index 55f7cc2b2ec..598ebcdf084 100644 --- a/arch/x86/cpu/ivybridge/model_206ax.c +++ b/arch/x86/cpu/ivybridge/model_206ax.c @@ -425,7 +425,7 @@ static int model_206ax_get_count(const struct udevice *dev) static int cpu_x86_model_206ax_probe(struct udevice *dev) { - if (dev->seq == 0) + if (dev_seq(dev) == 0) model_206ax_init(dev); return 0; |