Cast to a uintptr_t rather than directly to the enum. As per the discussion in below linked media patch.
Unified · Split
| @@ -971,7 +971,7 @@ static int ina2xx_probe(struct i2c_client *client, · 970 unmodified lines | ||
| 971 | 971 | } |
| 972 | 972 | |
| 973 | 973 | if (client->dev.of_node) |
| 974 | − type = (enum ina2xx_ids)of_device_get_match_data(&client->dev); | |
| 974 | + type = (uintptr_t)of_device_get_match_data(&client->dev); | |
| 975 | 975 | else |
| 976 | 976 | type = id->driver_data; |
| 977 | 977 | chip->config = &ina2xx_config[type]; |