summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2023-09-22 21:34:13 +0200
committerAndi Shyti <andi.shyti@kernel.org>2024-02-08 09:34:16 +0100
commitecaaeff9006c0577e31d211066e193ce34ffba46 (patch)
treeccab73902cfcf575302ac3837a50c3d5a6e82546 /drivers/i2c
parentdf7cbce47a993b14dc2cf71ba0cba081766277e0 (diff)
downloadlinux-ecaaeff9006c0577e31d211066e193ce34ffba46.tar.gz
linux-ecaaeff9006c0577e31d211066e193ce34ffba46.tar.bz2
linux-ecaaeff9006c0577e31d211066e193ce34ffba46.zip
i2c: i801: Replace magic value with constant in dmi_check_onboard_devices
Replace magic number 10 with the appropriate constant. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-i801.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 3932e8d96a17..8af944bd89f2 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -1117,7 +1117,7 @@ static void dmi_check_onboard_devices(const struct dmi_header *dm, void *adap)
{
int i, count;
- if (dm->type != 10)
+ if (dm->type != DMI_ENTRY_ONBOARD_DEVICE)
return;
count = (dm->length - sizeof(struct dmi_header)) / 2;