From: Heiner Kallweit Date: Fri, 22 Sep 2023 19:34:13 +0000 (+0200) Subject: i2c: i801: Replace magic value with constant in dmi_check_onboard_devices X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ecaaeff9006c0577e31d211066e193ce34ffba46;p=linux.git 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 Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti --- diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 3932e8d96a171..8af944bd89f21 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;