i2c: i801: Replace magic value with constant in dmi_check_onboard_devices
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 22 Sep 2023 19:34:13 +0000 (21:34 +0200)
committerAndi Shyti <andi.shyti@kernel.org>
Thu, 8 Feb 2024 08:34:16 +0000 (09:34 +0100)
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>
drivers/i2c/busses/i2c-i801.c

index 3932e8d..8af944b 100644 (file)
@@ -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;